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

Assertion in "hide all popovers until" will fail when changing a showing "hint" popover to "auto" #10996

Open
Gingeh opened this issue Feb 5, 2025 · 0 comments

Comments

@Gingeh
Copy link

Gingeh commented Feb 5, 2025

What is the issue with the HTML Standard?

Here's the problematic scenario:

<div popover="hint"></div>
<script>
const popover = document.querySelector("div");
popover.showPopover();
popover.setAttribute("popover","auto");
</script>

When the popover is shown, its opened in popover mode is set to "hint".
Upon changing the popover attribute:

  1. The popover attribute change steps say to run the hide popover algorithm.
  2. The hide popover steps eventually say If element's popover attribute is in the auto state or the hint state, then: Run hide all popovers until given element (step 7.1).
  3. The hide all popovers until steps eventually say If document's showing hint popover list contains endpoint: Assert: endpoint's popover attribute is in the hint state (step 6.1)
  4. That assertion fails because the popover's opened in popover mode is still "hint" (so it is in the document's showing hint popover list), but its popover attribute has been changed to "auto".
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

1 participant