[whatwg] "fullscreenchange" event should be delayed to after transition is complete

Chris Pearce cpearce at mozilla.com
Tue May 15 17:33:15 PDT 2012


Hi,

I think that the "fullscreenchange" even dispatch should be specified to 
be dispatched once the animation to transition to/from fullscreen has 
finished.

The problem is that at least two of the platforms we're supporting have 
non-instantaneous transitions from windowed to fullscreen mode. So if we 
dispatch "fullscreenchange" events as specified during 
HTMLElement.requestFullscreen() then the "fullscreenchange" events can 
arrive before the transition animation has finished, so things like 
window.screenY and window.size.* haven't reached their stable fullscreen 
values.

Our unit tests have been randomly failing because of this, so I'm sure 
this will cause problems with authors in the wild.

I think having the state changes performed by 
HTMLElement.requestFullscreen() happen synchronously before the 
animation/transition to enter fullscreen completes (as specified 
currently) and having them undone before the animation to exit 
fullscreen completes (also as specified currently in exitFullscreen()) 
is probably OK, since these state changes maybe required for the 
transition/animation. It's only the dispatch of "fullscreenchange" I 
think we should change.


Cheers,
Chris Pearce.


More information about the whatwg mailing list