Bug 227387

Summary: Webkit Fullscreen API does not prevent dismiss gesture on Mobile Safari if user is scrolling or website is handling pinch
Product: WebKit Reporter: James Campbell <james.campbell>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: jer.noble, jespertheend, peng.liu6, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: Unspecified   
Attachments:
Description Flags
Example of scrolling issue none

James Campbell
Reported 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/
Attachments
Example of scrolling issue (4.36 MB, image/gif)
2021-06-25 01:41 PDT, James Campbell
no flags
James Campbell
Comment 1 2021-06-25 01:44:30 PDT
I can also confirm this still happens in Mobile Safari 15
Radar WebKit Bug Importer
Comment 2 2021-07-02 01:42:17 PDT
Note You need to log in before you can comment on or make changes to this bug.