Skip to content

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

Closed
@Gingeh

Description

@Gingeh

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".

Metadata

Metadata

Labels

topic: popoverThe popover attribute and friends

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions