[whatwg/fullscreen] Unfullscreening unconditionally removes from top layer, ignoring other qualities (Issue #222)

https://fullscreen.spec.whatwg.org/commit-snapshots/a69e295f652ec2b524e8429ecbe7bad61a57be21/#model

> To unfullscreen an element, unset element’s fullscreen flag and iframe fullscreen flag (if any), and remove it from its node document’s top layer.

This means, for example, if you open a modal dialog, then fullscreen it, then unfullscreen it, it will no longer be in the top layer despite, presumably, still being modal.

Am I missing something? Is a fullscreened element supposed to forget its modalness (and if so, is that actually happening in one of the algos, somewhere I'm missing)? Or do we need to get a little more complex with this?

Assuming we do, I assume it might be something like giving an element a set of "top-layer reasons", and when we clean up the top layer we only remove it when all of its reasons are gone. Fullscreen would just add/remove "fullscreened" from the, modal dialogs would add/remove a "modal" reason, etc.

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

Message ID: <whatwg/fullscreen/issues/222@github.com>

Received on Monday, 3 April 2023 20:32:09 UTC