Re: [whatwg/fullscreen] document.fullscreenElement in scroll event after entering fullscreen matters for compat (#74)

@upsuper, that was it indeed, "I have a feeling that we may actually want fullscreen events to be dispatched at a very early stage, probably even before resize."

The problem has to do with restoring the original scale and scroll position after exiting fullscreen. This isn't something the spec covers, and I'd be surprised if it works exactly the same in all browsers. In any case, if the orientation lock changes are applied in reaction to fullscreenchange events, it means that when exiting fullscreen, the orientation will still be locked for a few more frames. The problem is the same as with this sequence of events, with a few seconds between each step:
1. Scroll and zoom in portrait
2. Enter fullscreen
3. Lock orientation to landscape
4. Exit fullscreen
5. Unlock the orientation

After this, will the scale and scroll position be the same as in the beginning? If yes, then it must mean that unlocking the screen orientation is what restores the pre-fullscreen state, i.e. the APIs are entangled in a way that isn't suggested by either spec. Maybe they should be?

Or, possibly, some change to the timing would happen to fix this problem.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/issues/74#issuecomment-302357075

Received on Thursday, 18 May 2017 09:52:19 UTC