- From: Simon Pieters <notifications@github.com>
- Date: Tue, 05 May 2026 04:35:13 -0700
- To: whatwg/fullscreen <fullscreen@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 5 May 2026 11:35:21 UTC
zcorpan left a comment (whatwg/fullscreen#232)
> I noticed a problem and am wondering about the more general idea with nested fullscreen scenarios. In both "`requestFullscreen(options)` method steps" and the "exit fullscreen" algorithm, the flag is only set/unset on a single element. But in nested scenarios, there's no guarantee that those elements are the same. Consider this simple case:
>
> ```js
> elm1.onclick = () => { elm1.requestFullscreen({ keyboardLock: "browser" }); }
> elm2.onclick = () => { elm2.requestFullscreen(); }
> ```
>
> If the elements are clicked in order and later something triggers "fully exit fullscreen", the keyboard lock flag will remain set on _elm1_.
No it won't, because fully exit fullscreen calls #unfullscreen-an-element on all fullscreened elements which unsets the keyboard lock flag.
It's true that "exit fullscreen" for elm2 in your example will change the fullscreen element to elm1 and then keyboard lock is active again; this is intentional.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/pull/232#issuecomment-4378824489
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/fullscreen/pull/232/c4378824489@github.com>
Received on Tuesday, 5 May 2026 11:35:21 UTC