Bug 236536

Summary: Sideways overscroll causes movement in scroll-snap container
Product: WebKit Reporter: Bruno Stasse <augus.dupin>
Component: ScrollingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: nmouchtaris, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac (Intel)   
OS: macOS 11   
Attachments:
Description Flags
testcase-scroll-y
none
testcase-scroll-x
none
video-scroll-y none

Description Bruno Stasse 2022-02-12 02:30:19 PST
Created attachment 451777 [details]
testcase-scroll-y

In a unidirectional scroll-snap container, scrolling sideways with a trackpad during overscroll causes the scroll container to scroll in that "forbidden" direction, although no content is overflowing, and even with `overflow-x` or `overflow-y` set explicitly to `hidden`.

See the attached testcases for scroll container on the y and x axis. See also a video for the y axis.

Steps to reproduce:
- open the testcase file for the y axis
- scroll about half the content, then in another gesture scroll all the way down to cause overscroll
- without lifting the finger, scroll sideways (left or right)
- see the scroll content move in a forbidden direction

The expected behaviour is that the content does not move in that direction, it must only be allowed to move in the defined scroll direction.

I started to see this behaviour a few Safari TP versions back, possibly around version 137.
Comment 1 Bruno Stasse 2022-02-12 02:30:42 PST
Created attachment 451778 [details]
testcase-scroll-x
Comment 2 Bruno Stasse 2022-02-12 02:31:45 PST
Created attachment 451779 [details]
video-scroll-y
Comment 3 Simon Fraser (smfr) 2022-02-14 13:12:54 PST
Is scrolling in the unwanted direction just rubber-banding (aka overscroll)?
Comment 4 Bruno Stasse 2022-02-14 14:14:10 PST
Yes it is just rubber-banding indeed, it goes back into place afterwards.
Comment 5 Radar WebKit Bug Importer 2022-02-19 02:31:24 PST
<rdar://problem/89184230>