Bug 227387 - Webkit Fullscreen API does not prevent dismiss gesture on Mobile Safari if user is scrolling or website is handling pinch
Summary: Webkit Fullscreen API does not prevent dismiss gesture on Mobile Safari if us...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-25 01:41 PDT by James Campbell
Modified: 2023-11-04 14:13 PDT (History)
6 users (show)

See Also:


Attachments
Example of scrolling issue (4.36 MB, image/gif)
2021-06-25 01:41 PDT, James Campbell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Campbell 2021-06-25 01:41:12 PDT
Created attachment 432246 [details]
Example of scrolling issue

We develop a Web PDF Viewer SDK which our customers integrate into their web apps. Some of our customers use the webkitRequestFullscreen API to present this viewer fullscreen as they want to focus on the content without any chrome from Mobile Safari.

Unfortunately there appears to be a bug in iOS 14 when the user scrolls though the document then iOS can prematurely dismiss the fullscreen mode. Scrolling down seems to account for the fact the user is scrolling through the fullscreen content but scrolling up seem to have issue with not always waiting until user has reached top of scrollable content.

In addition to that our SDK allows the user to pinch to zoom into the PDF Document but unfortunately this will always end up with the fullscreen mode being dismissed.

The expected behaviour for me would be for Mobile Safari to wait until the user has reached the end of the scroll chain before a pan gesture causes the fullscreen to dismiss just as the Modal dialogs in iOS would.

As well as a way for the Website to hint that it needs to handle the touches for a gesture (i.e by calling preventDefault). Since iOS presents a close button this shouldn't prevent user from closing.

Here is a Codesandbox which recreates the issue:

Sandbox: https://codesandbox.io/s/fullscreen-dismiss-bug-vws32
Preview: https://vws32.sse.codesandbox.io/
Comment 1 James Campbell 2021-06-25 01:44:30 PDT
I can also confirm this still happens in Mobile Safari 15
Comment 2 Radar WebKit Bug Importer 2021-07-02 01:42:17 PDT
<rdar://problem/80071890>