Bug 253056 - [css-scroll-snap] Tap before scroll has settled causes scrolling to revert to the previous snap point
Summary: [css-scroll-snap] Tap before scroll has settled causes scrolling to revert to...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 253110 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-27 22:08 PST by Johannes Odland
Modified: 2023-05-22 04:13 PDT (History)
5 users (show)

See Also:


Attachments
A screen recording of the bug. The user taps the screen before the scroll has settled, and the browser scrolls back to the previous snap point. (1.05 MB, video/mp4)
2023-02-27 22:08 PST, Johannes Odland
no flags Details
Screen recording of issue on iOS 16.5: tapping multiple times before scroll has landed causes the page to scroll a small amount (1.47 MB, video/mp4)
2023-05-22 04:13 PDT, Johannes Odland
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Odland 2023-02-27 22:08:58 PST
Created attachment 465214 [details]
A screen recording of the bug. The user taps the screen before the scroll has settled, and the browser scrolls back to the previous snap point.

How to reproduse: 
1. Open a page with scroll-snap on :root/html (I.e. this codepen in debug mode: https://codepen.io/johannesodland/pen/poORgOr)
2. Scroll down
3. Tap the screen before the scroll has settled

Expected result: 
The tap should be registered as a normal click. This happens on desktop Safari, in other browsers and when scrolling a scroll-container with scroll-snap.

Actual result: 
The current snapping is interrupted, and the browser snaps back to the previous snap-point.
Comment 1 Johannes Odland 2023-02-27 22:20:44 PST
One more thing: The click is not propagated to event-handlers, preventing the page from reacting to clicks before the scroll has settled completely.
Comment 2 Simon Fraser (smfr) 2023-02-28 14:21:47 PST
*** Bug 253110 has been marked as a duplicate of this bug. ***
Comment 3 Radar WebKit Bug Importer 2023-03-06 22:09:14 PST
<rdar://problem/106346034>
Comment 4 Johannes Odland 2023-03-27 22:44:57 PDT
I have retested on iOS 16.4 and the bug still persists. 

I moved the test case to a new location for easier testing: https://johannesodland.github.io/browserbugs/safari-scroll-snap-click-during-scroll-issue.html
Comment 5 Johannes Odland 2023-05-22 04:13:37 PDT
Created attachment 466445 [details]
Screen recording of issue on iOS 16.5: tapping multiple times before scroll has landed causes the page to scroll a small amount

Retested on iOS Safari 16.5

The bug seems to be partially fixed. Tapping the screen once before the scroll has settled seems to work ok now. 

Unfortunately, tapping the screen multiple times before scroll has settled can cause the page to scroll a small amount up or down. 
When this happens the scroll does not snap to a snap point. Attaching a screen recording of the issue.