Bug 235960 - [css-scroll-snap] scroll-snap-align: none causes scroll position to reset when swiping
Summary: [css-scroll-snap] scroll-snap-align: none causes scroll position to reset whe...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari Technology Preview
Hardware: iPhone / iPad iOS 15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-01 09:20 PST by Sean Perkins
Modified: 2022-02-04 16:17 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Perkins 2022-02-01 09:20:48 PST
When swiping on a mobile device in a CSS scroll container implementation, the child element will not animate consistent with the swipe gesture when the sibling element has scroll snap disabled. This results in the child element flickering back to its initial position, while ignoring overflow style rules.

Steps to reproduce:

1. Go to test case on an iOS mobile device -> https://codepen.io/liamdebeasi/pen/zYPqKXR
2. Swipe slowly horizontal to the disabled child and release the touch gesture
3. Notice the animation is smooth back to the starting point.
4. Notice the image respects the overflow: hidden style with the border-radius.
5. Swipe quickly horizontally in the same direction as step 2 and release the touch gesture.
6. Notice the animation is non-existent and the element repaints immediately to the start position.
7. Notice the image repaints without respecting overflow: hidden for a frame and finally repaints correctly.


Expected:

- The animation for scroll snap implementation should be consistent, regardless of swipe gesture speed.
- Scroll snap should not override child overflow style rules.


Additional info:

- iOS 15.3 / iPhone Xs Max
- Mobile Safari
Comment 1 Radar WebKit Bug Importer 2022-02-04 16:17:31 PST
<rdar://problem/88513342>