
So to seamlessly restore full-screen to the previous full-screen element, developers must explicitly call Document.mozCancelFullScreen(), they can't rely on the user pressing the escape key. Firefox won't restore the previous full-screen element to full-screen state on escape key press. Note that if users press the escape key they will always fully-exit full-screen, i.e. The browser won't drop out of full-screen mode during the transition.

Now developers can simply call Document.mozCancelFullScreen() and seamlessly switch back. The developer may want to be able to switch full-screen mode seamlessly between the slide deck and (say) a, and then return to having the slide deck as the full-screen element so that the user can carry on with the presentation. Before this change, if the was in a cross-origin subdocument (like a YouTube embedded player in an ) returning full-screen mode to the slide deck from the was a two-step process users would have to fully-exit full-screen, and re-request full-screen mode on the slide deck element. One way to implement such a web app would be to have a full-screen element where the slides are shown.


To see how this is useful, consider the case of a PowerPoint clone or presentation web app that wants to run full-screen. Starting in Firefox 11, Document.mozCancelFullScreen() will restore full-screen state to the element that was previously full-screen. If there is no previous full-screen element in either the document or a parent document (full-screen mode isn't restored to former full-screen elements in child documents), then the browser will "fully-exit full-screen", and return the browser to normal mode. Previously Document.mozCancelFullScreen() would fully-exit full-screen and return the browser to "normal" mode.

We've made some changes to how the HTML full-screen API exits full-screen mode in Firefox 11, which is scheduled to ship in March 2012.
