This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23363 - requestFullscreen and dialog.showModal interaction
Summary: requestFullscreen and dialog.showModal interaction
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Fullscreen (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-26 09:27 UTC by Matt Falkenhagen
Modified: 2013-11-07 13:58 UTC (History)
3 users (show)

See Also:


Attachments

Description Matt Falkenhagen 2013-09-26 09:27:37 UTC
What should the top layer be in the following case?
dialog1.showModal();
dialog2.showModal();
dialog1.requestFullscreen();

I think dialog2 should be on top. This currently looks under spec'd though. showModal and requestFullscreen each require adding to the top of the top layer.

A related case is:
dialog1.requestFullscreen();
dialog2.showModal();
dialog1.showModal();

Maybe requestFullscreen should skip adding to top layer if it's already in the top layer.
Comment 1 Anne 2013-09-26 12:58:25 UTC
It seems more like you want a different behavior from the specification? How is this not defined? If we want a change, an email to the WHATWG list outlining it including a pointer to this bug would be good.
Comment 2 Matt Falkenhagen 2013-09-26 13:19:35 UTC
I guess what's not defined is what "add an element to the top layer" means when it's already in the top layer. Is it moved to the top of the top layer, remain where it is, or do you have two copies in the top layer?

For example, the HTML spec says:
"When an element is added to the pending dialog stack, it must also be added to the top layer layer."

And requestFullscreen says:
"add context object on document's fullscreen element stack", which leads to:
"To add an element on a document's fullscreen element stack, add it on top of document's browsing context's top layer[...]"

In these cases, what do you do if it's already in the top layer?

Maybe I'm just reading too much into the word "add"... is the behavior actually well-defined here?
Comment 3 Anne 2013-09-27 19:51:22 UTC
I guess we should clarify the top layer stack is an ordered set, semantically. Meaning that if the element is already in, it would just move around within the set. However, as you say in comment 0 we could make it not do that too. Not sure what is better.
Comment 4 Matt Falkenhagen 2013-10-31 13:46:25 UTC
The ordered set behavior sounds OK to me, and thanks for clarifying. In comment 0 I'd forgotten that requestFullscreen terminates if it's "not allowed to show a popup", which basically means the user has to click something in the active modal dialog for something to go fullscreen over it. I was worried something would inadvertently go on top of the active modal dialog, and the user wouldn't be able to exit.