Skip to content

Popover does not know what triggered it #9111

@jpzwarte

Description

@jpzwarte

As far as I can tell from reading the spec, a popover doesn't know which element invoked it (a "trigger element").

Is this something that should be added?

I suppose this could be useful if the CSS Anchor positioning hasn't shipped yet, but popovers have. You could then use @floating-ui/dom for anchoring the popover. But that all depends on the popover knowing what triggered it.
Another example would be to style the trigger element when the popover is open.

One solution would be to specify the trigger when calling showPopover/togglePopover?

element.showPopover(this); or element.showPopover({ trigger: this });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions