-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Hint popovers can't be the "topmost open popover ancestor" of dialog elements #11008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From reading the chromium implementation I believe the problem is that step 9.4.4 in "topmost popover ancestor" is missing the condition that okNesting is also true if isPopover is false (source), without that condition non-popover elements (i.e. dialog elements) are treated as if they were "auto" popovers and are disallowed from being descendants of "hint" popovers. |
Are you sure the problem doesn't all just boil down to "nearest inclusive open popover" not including |
My comment about "topmost popover ancestor" isn't about it handling hints but specifically about it not allowing dialog elements to be nested within hint popover ancestors. Step 9.4.4 currently only sets okNesting if the descendant is "hint" or the ancestor is "auto", this translates to "anything can be nested within auto popovers but only hints can be nested within hints". See the following table for a more visual reference, the "topmost popover ancestor" steps say the "?" should be "No" while Chromium and WPT say it should be "Yes". The note above those steps also suggests it should be a "Yes":
|
For some extra motivation: this non-spec behaviour is implemented in Chromium, Webkit, Firefox and Ladybird, in addition to being expected by WPT |
"nearest inclusive target popover for invoker" also needs to be updated to accept "hint" popovers to match existing light dismissal implementations. |
On the one hand, it's probably not a good idea for developers to open a modal dialog inside of a hint popover. I imagine that would be quite disruptive. On the other hand, without this provision, should developers do such a thing we'd be back to the same type of issues described in #9998. So I think the change @Gingeh describes is warranted. Though a small aside; I think Webkit and Firefox pass this WPT due to a lack of support for "hint" popovers. So it is perhaps coincidental for them. |
What is the issue with the HTML Standard?
Step 15 in "show popover", step 12 in the dialog.show() method steps and step 20 in "show a modal dialog" will all return null because "topmost popover ancestor" and "nearest inclusive open popover" both require the popover state to be "auto".
This goes against the behaviour expected by WPT (e.g. https://wpt.live/html/semantics/popovers/popover-top-layer-nesting-hints.html) and the behaviour of all major implementations.
The text was updated successfully, but these errors were encountered: