Closed Bug 867967 Opened 12 years ago Closed 11 years ago

mozCancelFullScreen method won't close fullscreen window without direct user interaction, e.g. click-event.

Categories

(Core :: DOM: Core & HTML, defect)

19 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 948268

People

(Reporter: snake.sven, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130307122903 Steps to reproduce: I requested the element.mozCancelFullScreen() method from an asynchronously called function inside my custom Javascript code. Actual results: Fullscreen window did not close. I reassured the specific line containing the mozCancelFullScreen call was reached. Expected results: Fullscreen window should have closed anyway. The mozfullscreenchange-event wasn'T dispatched either.
Open the attached file and start up fullscreen-mode within 5 seconds. Then a setTimeout triggers mozCancelFullscreen.
That's probably intentional, to make it harder to confuse the user into thinking that full-screen mode has been exited when it has not.
Blocks: 545812
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
I've been thinking about this recently. You can actually exit fullscreen by just removing the fullscreen element from the document, so we may as well just make document.mozCancelFullScreen() work without user input.
Chris, your idea works fine except Android FF. Thanks.
I can confirm this, if that's still helpful. It's been reported in the Video.js tracker (including by shuk) https://github.com/videojs/video.js/issues/434 The provided use case is a developer wanting the video to exit fullscreen when the video ends. Seems like a valid use case to me.
I checked with a build fresh out of Mercurial and the mozCancelFullScreen calls are not denied there: /* no effect in FF 26, works in Nightly */ setTimeout(function() { document.mozCancelFullScreen(); }, 3000);
We changed behaviour in Firefox 29 to allow script to exit fullscreen, in bug 948268.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: