Apologies for the delayed update on this. I've looked into various options and also submitted a patch, but I'm not happy with it yet. Only leaving fullscreen when the fs warning is on screen requires a lot of refactoring, since we only know about the fs warning state in the frontend. The event has to be passed all the way through the focus manager to the frontend code. This includes extending the webidl interfaces to pass caller type (if the open/focus was triggered by the website or the system). Going for Chromiums approach and exiting fullscreen on `window.open` and `window.focus`, would make for a much cleaner patch. We could handle everything in the backend. It would also help with other 'evil traps' where websites abuse popups in fullscreen to trick users into installing addons (Bug 1596189). While there are some valid use cases for popups in fullscreen this wouldn't fully break workflows. Websites are aware of the fullscreen state and can avoid this behavior and given the market share of Chromium based browsers they already do. An example use case is Google Slides, where the user can open speaker notes in a popup. In Chromium, if the notes window is opened while in (DOM) fullscreen, the fullscreen is cancelled and the user has to enter it again. That's an extra click.
Bug 1432856 Comment 16 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Apologies for the delayed update on this. I've looked into various options and also submitted a patch, but I'm not happy with it yet. Only leaving fullscreen when the fs warning is on screen requires a lot of refactoring, since we only know about the fs warning state in the frontend. The event has to be passed all the way through the focus manager to the frontend code. This includes extending the webidl interfaces to pass caller type (if the open/focus was triggered by the website or the system). Going for Chromiums approach and exiting fullscreen on `window.open` and `window.focus`, would make for a much cleaner patch. We could handle everything in the backend. It would also help with other 'evil traps' where websites abuse popups in fullscreen to trick users into installing addons (Bug 1596189). While there are some valid use cases for popups in fullscreen this wouldn't fully break workflows. Websites are aware of the fullscreen state and can avoid this behavior; given the market share of Chromium based browsers they already do. An example use case is Google Slides, where the user can open speaker notes in a popup. In Chromium, if the notes window is opened while in (DOM) fullscreen, the fullscreen is cancelled and the user has to enter it again. That's an extra click.