NEW 264215
Prevent requestFullscreen() from closing when touch events are preventDefault'ed
https://bugs.webkit.org/show_bug.cgi?id=264215
Summary Prevent requestFullscreen() from closing when touch events are preventDefault'ed
Jesper van den Ende
Reported 2023-11-04 13:53:48 PDT
Created attachment 468487 [details] screen recording To reproduce: 1. Visit https://requestfullscreen-touch-preventdefault.glitch.me on iOS 2. Click the 'Enter Full Screen' button 3. Touch the red square and drag down. Expected behaviour: Full screen is not closed Actual behaviour: Full screen is closed, despite the fact that the events on the red square calls `event.preventDefault()` and has the `touch-action: none;` css style applied.
Attachments
screen recording (15.65 MB, video/mp4)
2023-11-04 13:53 PDT, Jesper van den Ende
no flags
Jer Noble
Comment 1 2023-11-06 16:56:43 PST
It sounds like the behavior you're reproducing here is that `preventDefault()` doesn't block the "drag to dismiss" behavior which allows users to exit fullscreen mode. This is intentional, and is a anti-phishing / security feature. The site cannot block the user from exiting fullscreen, either via drag-to-dismiss, the `esc` key, or the persistent close button.
Alex Moore
Comment 2 2023-11-07 05:46:33 PST
@Jer Noble: Safari/Webkit's implementation of the Fullscreen API ensures that its primary use case, i.e. games, is effectively unusable. Most mobile web games require swipe actions of some kind, and both native iOS games and web games on Android fully support this functionality. Webkit needs a solution to the security issues that still enables developers to build games.
Radar WebKit Bug Importer
Comment 3 2023-11-11 12:54:18 PST
andj2223
Comment 4 2023-11-13 17:26:28 PST
drag-to-dismiss makes many forms of non-game applications effectively unusable in full screen as well: Drawing apps that use dragging gestures to make pen/brush strokes 3d viewing applications that use dragging gestures to navigate the camera / viewpoint Map applications that use dragging gestures to move the map Etc. I sincerely hope that this is rectified before the release of iOS 17.2.
Note You need to log in before you can comment on or make changes to this bug.