This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://fullscreen.spec.whatwg.org/#dom-document-exitfullscreen Since the same thing is done with topDoc as with exitDocs, it would be nice to replace the topDoc bits with e.g. "If exitDocs's last document has a browsing context container, append that browsing context container's node document to exitDocs." after the resize check. It also looks like it's possible for topDoc to have an empty fullscreen element stack at this point. Start with a top-level document with a div and an iframe on its stack, and a fullscreen element inside the iframe too. Calling iframe.contentDocument.exitFullscreen() will schedule the animation frame task steps, but resize will be false. If the iframe is moved to another document with nothing on its fullscreen element stack before those steps run, we shouldn't fire any events on that document. It probably doesn't matter how we deal with this situation, "fully exit fullscreen" seems fine.
Sorry for mixing issues in a single bug. I filed bug 26676 for in place of the second paragraph.
Fixed the first paragraph. No idea how to fix the second, but that's a separate bug :-) https://github.com/whatwg/fullscreen/commit/43d2f74803e6e915d2c056d1a5960591a71a0360