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

See Also:


Attachments

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
https://q0j97.csb.app/

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
<rdar://problem/85805111>
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:

https://stackoverflow.com/questions/71717565/prevent-ios-safari-from-animating-its-address-bar-when-touch-action-none-is-used

Also a reproduction site:

https://safari-touch-action-bug.netlify.app/

And a demo video of the problem:

https://www.youtube.com/shorts/RJAQp4YO4gg
Comment 5 Sam Sneddon [:gsnedders] 2022-05-03 10:03:09 PDT
rdar://86966949
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).