Skip to content

Commit ebe2e69

Browse files
fix(navigation): patch fix security PageOverlay trap focus issue
Call `handleBlur` conditionally for `PageOverlay`, otherwise the popover closes and menu items don't trigger.
1 parent 0f08ce5 commit ebe2e69

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

  • src/core/packages/chrome/navigation/src/components/popover

src/core/packages/chrome/navigation/src/components/popover/index.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,15 @@ export const SideNavPopover = ({
194194
triggerRef.current?.contains(nextFocused) || popoverRef.current?.contains(nextFocused)
195195
);
196196
const isTrappedByFlyout = (nextFocused as HTMLElement)?.classList.contains('euiFlyout');
197-
198-
if (isStayingInComponent === false && isTrappedByFlyout === false) {
197+
const isTrappedByPageOverlay = !!(nextFocused as HTMLElement)?.closest(
198+
'.securitySolution-pageOverlay'
199+
);
200+
201+
if (
202+
isStayingInComponent === false &&
203+
isTrappedByFlyout === false &&
204+
isTrappedByPageOverlay === false
205+
) {
199206
handleClose();
200207
}
201208
},

0 commit comments

Comments
 (0)