Skip to content

Ensure modal dialogs can nest inside of hint popovers #11253

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

keithamus
Copy link
Contributor

@keithamus keithamus commented Apr 23, 2025

This change allows for dialogs that are nested inside of a hint popover to be shown as modal. The current spec, as written, means that dialogs may close their parent hint popover causing issues similar to #9998. This change makes it such that a dialog (or fullscreen element) is a viable candidate to nest inside of a hint popover.

This behaviour is exhibited in all major engines (which currently allow modal dialogs to nest inside of hint popovers) including Chrome, making this change normative.

This closes #11008, by making the spec modifications @Gingeh suggests in that issue.

(See WHATWG Working Mode: Changes for more details.)


/popover.html ( diff )

@keithamus
Copy link
Contributor Author

/cc @mfreed7 @josepharhar @nt1m

Copy link
Contributor

@mfreed7 mfreed7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for putting this up!

@Gingeh
Copy link

Gingeh commented Apr 23, 2025

Thanks for this!
"nearest inclusive open popover" also needs to be updated to allow hint popovers to complete the fix

@domenic domenic added the topic: popover The popover attribute and friends label Apr 24, 2025
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editorially LGTM, but can you fill out the checkboxes?

@keithamus
Copy link
Contributor Author

@annevk or @nt1m can I get WebKit's support of this change?

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the specification is out of line with multiple implementations and the implementations are aligned, there's generally no need to seek implementer interest. (Also, in this case you had interest from Chromium and presumably you could have given interest from Gecko.) (But also, it's fine to ask regardless. I thought to share this in case it's useful in the future.)

You do need to fix the duplicate "or".

@annevk
Copy link
Member

annevk commented Apr 24, 2025

Oh, this is not the case I thought it was as Gecko and WebKit do not support popover=hint. I guess the test doesn't fail early if that's not supported? (Perhaps it could be considered a bug fix for the popover=hint PR, but that's not entirely clear.)

In that case I'm going to defer to @nt1m for WebKit, but this is probably fine.

@Gingeh
Copy link

Gingeh commented Apr 28, 2025

Could Ladybird count as an "interested implementer" for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: popover The popover attribute and friends
Development

Successfully merging this pull request may close these issues.

Hint popovers can't be the "topmost open popover ancestor" of dialog elements
5 participants