- From: Xiaocheng Hu <notifications@github.com>
- Date: Thu, 13 Jul 2023 15:57:08 -0700
- To: whatwg/fullscreen <fullscreen@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fullscreen/issues/227@github.com>
(Originally filed as a [Chrome bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1464450)) What should happen if we: 1. Show a modal dialog 2. Run `document.documentElement.requestFullscreen()` (by e.g. clicking a button in the dialog) Live test case: https://fullscreen-demo.viggers.net/ If I read the spec correctly, this should bring the `documentElement` into the top layer, which is then rendered over the modal dialog. And since the rest of the page is currently inert, the page is unusable until we exit fullscreen. This is the current behavior observed in Chrome, which doesn't seem to be a desirable behavior however. It means we can't fullscreen the page when a modal dialog is open. Firefox simply fullscreens the page while keeping the modal dialog at the front. --- Proposal: Can we make it a special case when running `requestFullscreen()` on `documentElement`, so that it simply fullscreens the page without interacting with the top layer? I suppose its main purpose is to fullscreen the entire document, and we don't want anything that's already top-layer to be covered. Also as a side note, if we call `document.body.requestFullscreen()`, all browsers move the document body to the top layer and cover the modal dialog. So this really is just a special case with `documentElement`, and we don't need to worry about any other DOM ancestor of the dialog. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fullscreen/issues/227 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fullscreen/issues/227@github.com>
Received on Thursday, 13 July 2023 22:57:13 UTC