Skip to content

When attribute value changes, do we run hiding popover algorithm regardless? #9459

@ziransun

Description

@ziransun

At https://html.spec.whatwg.org/multipage/popover.html#the-popover-attribute, for The "attribute change steps", at step 3, it says

If oldValue and value are in different [states](https://html.spec.whatwg.org/multipage/popover.html#attr-popover), then run the [hide popover algorithm](https://html.spec.whatwg.org/multipage/popover.html#hide-popover-algorithm) given element, true, true, and false.

Yet would it make sense to check if the popover is open before running the hiding popover steps? Checking current implementations, we can see that both chromium and WebKit do the checks. Gecko also does the check at an ongoing patch (https://phabricator.services.mozilla.com/D181880).

Metadata

Metadata

Assignees

No one assigned

    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