Bug 233417 - touch-action doesn't prevent the Safari UI from collapsing
Summary: touch-action doesn't prevent the Safari UI from collapsing
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad iOS 15
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2021-11-22 02:40 PST by Matt Perry
Modified: 2022-06-30 10:54 PDT (History)
8 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Matt Perry 2021-11-22 02:40:01 PST

Steps to reproduce:

Scroll the page by initiating touch gesture from the green background. Page scrolls, this is expected. Scroll until the address bar disappears.

White box has "touch-action: pan-x" applied. Initiate touch gesture from the white box. Page does not scroll, this is expected.

Attempt to scroll down from white box. Page does not scroll but address bar *does* expand. This is not expected.

This breaks non-native drag gesture implementations.
Comment 1 Bruno Stasse 2021-11-22 05:38:08 PST
This also happens with (native) horizontal scroll containers.

It would also be great to have a way to prevent this on vertical scroll/pan-y, as it is not always desirable. This library, for instance, is broken because the viewport gets resized as a picture is being swiped up or down: https://photoswipe.com
Comment 2 Radar WebKit Bug Importer 2021-11-29 02:40:20 PST
Comment 3 Simon Fraser (smfr) 2022-02-02 11:51:11 PST
This is controlled by MobileSafari code. The above radar tracks that issue.
Comment 4 Hristiyan Dodov 2022-04-16 03:06:41 PDT
I recently ran into this issue as well. In case more info is required, here's a Stack Overflow question:


Also a reproduction site:


And a demo video of the problem:

Comment 5 Sam Sneddon [:gsnedders] 2022-05-03 10:03:09 PDT
Comment 6 Sam Sneddon [:gsnedders] 2022-05-13 06:35:13 PDT
This is being addressed within Safari, not WebKit.
Comment 7 Brent Fulgham 2022-06-30 10:54:18 PDT
We believe that this bug was fixed in the iOS 16.0 Beta 1 (and newer).