-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
What is the issue with the HTML Standard?
It has been brought up that a popover, opened "from" a modal dialog, becomes inert unless the popover is a flat tree descendent of the dialog. E.g.
<dialog id=d1>Dialog</dialog>
<div popover id=p1>Popover</div>
<script>
d1.showModal();
p2.showPopover();
</script>
In this example, the popover is rendered inert, which means that clicking on the popover light dismisses it, because the popover behaves as pointer-events:none and the click goes through it. Other examples might include a "toast" that shows up (via popover=manual) and has a Close button to dismiss it. That close button would not be click-able, even though the toast might obscure part of the modal dialog.
Here's a live example: https://jsbin.com/mugebod/1/edit?html,output
It might be possible (web-compat-wise) to change that behavior, so that other top layer elements such as popovers and non-modal dialogs which come after the blocking (topmost) modal dialog also escape inertness.
I believe it's still correct to have prior top layer elements (such as d1 in my linked example above) stay inerted, since they're "behind" the topmost modal dialog in the top layer stack.
Thoughts? @alice
See a related discussion in CSSWG about the new interactivity property, here:
https://github.com/w3c/csswg-drafts/pull/11178/files#r1845716939
Also see the current HTML spec for how modal dialogs escape inertness, here:
https://html.spec.whatwg.org/multipage/interaction.html#modal-dialogs-and-inert-subtrees