Skip to content
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

The topmost popover ancestor algorithm is used for manual popovers #10988

Open
Gingeh opened this issue Feb 4, 2025 · 1 comment
Open

The topmost popover ancestor algorithm is used for manual popovers #10988

Gingeh opened this issue Feb 4, 2025 · 1 comment

Comments

@Gingeh
Copy link

Gingeh commented Feb 4, 2025

What is the issue with the HTML Standard?

The show popover steps unconditionally1 run "the topmost popover ancestor algorithm given element" which then asserts "newPopoverOrTopLayerElement's popover attribute is not in the no popover state or the manual state".

There doesn't appear to be anything preventing the topmost popover ancestor algorithm from being called on a manual popover. Have I missed something obvious?

The results of that algorithm are only used in the step 17 conditional block where that assertion would always succeed, so it seems like a fix would be to move the calls to there.

Footnotes

  1. Except for invalid popovers.

@mfreed7
Copy link
Contributor

mfreed7 commented Feb 7, 2025

I agree - those two calls to "topmost popover ancestor" should likely be guarded by "If originalType is auto or hint, then:...". The autoAncestor and hintAncestor values are only ever used in that case anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants