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-element-requestfullscreen fullscreenElements is populated synchronously, but before the animation frame task is run, the elements of fullscreenElements may have been moved in ways that still passes the ready checks, but leaves the resulting fullscreen element stacks inconsistent, for example if the pending element is moved between two iframes immediately after requestFullscreen() returns. The fix should be to populate the list of newly fullscreen elements in the animation frame task, immediately before pushing to stacks and firing events. Note that in such a rewrite, the ready check could be performed for only the pending element, since it is now recursive.
https://github.com/whatwg/fullscreen/commit/13e267c9bf275b645d4e7652e3acbc16f3dc5efb
LGTM and follow-up: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26671