You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the inner pop-over is opened, the outer one closes again. The pop-overs also close when the panels are clicked, or when trying to select an item from the ListBox dropdown-menu.
Expected behavior
The PopOver should only close when it is dismissed, i.e. when the user presses ESC oder clicks outside the PopOverPanel.
Additional context
This issue arises from the fact that we use portalling for overlay elements, like PopOver or SelectMenu. Most of these use PopUpPanel to render the pop-up, which uses the behavior provided by the OpenCloses closeOnBlur() function. Its implementation currently does not work for nested portals, since they are rendered outside the main layout directly under the <body>. The function uses Event.composedPath() to check whether the event originated from inside the portal or not. This is not enough, because the composed path is sometimes empty, even though the event source is inside the portal.
The text was updated successfully, but these errors were encountered:
henryB99
changed the title
Nested p
Incorrect PopOver closing behavior
Dec 29, 2023
Describe the bug
The headless
PopOver
closes even when the click comes from inside thePopOverPanel
or a nested floating element.To Reproduce
This is the code I tested with:
When the inner pop-over is opened, the outer one closes again. The pop-overs also close when the panels are clicked, or when trying to select an item from the
ListBox
dropdown-menu.Expected behavior
The
PopOver
should only close when it is dismissed, i.e. when the user presses ESC oder clicks outside thePopOverPanel
.Additional context
This issue arises from the fact that we use portalling for overlay elements, like
PopOver
orSelectMenu
. Most of these usePopUpPanel
to render the pop-up, which uses the behavior provided by theOpenClose
scloseOnBlur()
function. Its implementation currently does not work for nested portals, since they are rendered outside the main layout directly under the<body>
. The function usesEvent.composedPath()
to check whether the event originated from inside the portal or not. This is not enough, because the composed path is sometimes empty, even though the event source is inside the portal.The text was updated successfully, but these errors were encountered: