Full screen mode does not work on Android |
||||
Issue descriptionChrome Version: (copy from chrome://version): 61.0.3142.0 OS: Android What steps will reproduce the problem? (1) Visit http://www.mdw.la/infinitube/testfs/index.html (2) Tap on the blue box to go full screen What is the expected result? The page should go full screen. This works on desktop. What happens instead? Nothing happens. On the JS console, I see: "Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture." This page is a very basic "game" made with Phaser.io, a popular HTML5 gaming framework. Apparently, full screen mode broke in M56, according to several posts: http://www.html5gamedevs.com/topic/29072-fullscreen-is-not-working-in-chrome-v56-android/ http://www.html5gamedevs.com/topic/28619-fullscreen-not-working-on-chrome-mobile-v56/ https://github.com/photonstorm/phaser-ce/issues/27 So, this appears to be a fairly recent regression. Note that I also happen to see this behavior when running on desktop with devtools on and device emulation enabled. Of course, this could be a case of phaser.io using the fullscreen API incorrectly, however, it's a developer-impacting regression and would be good to clarify what should be happening here. No idea who to assign this to -- sorry for the random set of people on this!
,
Jul 17 2017
,
Jul 17 2017
This sounds like https://docs.google.com/document/d/1oF1T3O7_E4t1PYHV6gyCwHxOi3ystm0eSL5xZu7nvOg/edit#heading=h.qq59ev3u8fba, an intentional security tightening that shipped in M56. For any intervention, some developer pain is expected in order to force them to move to best practices, and since this has been in stable for 3 releases already, it seems this pain is tolerable and most developers have already adapted. So I'll tentatively close as working as intended.
,
Jul 17 2017
I thought the change in M56 is to not mark it as user gesture for scrolling. If user did tap, shouldn't this work?
,
Jul 17 2017
It depends on the exact event they're triggering on. It looks like this JS is going fullscreen on "pointerdown". According to Rick's doc, that no longer works as of M56 -- I believe it should work if it changes to "pointerup" instead.
,
Jul 17 2017
Making sense. Thanks.
,
Jul 18 2017
Right, we don't want it to be possible for, (for example) an ad to take the page fullscreen when the user scrolls. Moving the handler from pointerdown to pointerup will fix the problem. The change is tracked in issue 611981 and approved in https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/TO_x7FRkdmw. |
||||
►
Sign in to add a comment |
||||
Comment 1 by tedc...@chromium.org
, Jul 17 2017