Skip to content

Option to automatically close Popover when another overlay opens #9768

@rolfsmeds

Description

@rolfsmeds

Describe your motivation

In some use cases, you want Popover to close when any other overlay opens (e.g. DatePicker dropdown, another Popover, Dialog). Rich tooltips opened on hover are a good example of this (it seems that mouseout closing isn't reliably triggered in this scenario, which exacerbates the problem).

Describe the solution you'd like

An opt-in automatic closing of a Popover whenever another overlay opens.

Tooltip has this mechanism by default (

__onOverlayOpen() {
if (this.manual) {
return;
}
// Close tooltip if another overlay is opened on top of the tooltip's overlay
if (this._overlayElement.opened && !this._overlayElement._last) {
this._stateController.close(true);
}
}
).

E.g. setCloseOnOtherOverlay(true) / close-on-other-overlay

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions