Skip to content

Popover: Implicit anchor element removed too early #11694

@jakearchibald

Description

@jakearchibald

What is the issue with the HTML Standard?

https://codepen.io/jaffathecake/pen/Qwyjyma?editors=1111

In the demo, when you hide the popover (by clicking open) then clicking outside the popover…

In Chrome, the popover fades out in place.

In Safari, the popover changes position, then fades out.

Chrome's behaviour is achieving what I wanted in this case, but I'm pretty sure Safari is correct according to the spec.

The implicit anchor is removed straight after the "beforetoggle" event, which explains the Safari behaviour, whereas it seems to 'stick' in Chrome.


I'm not sure what the solution is here. Either the change to the implicit anchor element needs to delay in some way that just works, or maybe the developer needs to delay the change to this value, eg:

#mypopover {
  transition: position-anchor 1000ms ease allow-discrete;
}

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