diff --git a/src/core/packages/chrome/navigation/src/components/popover/index.tsx b/src/core/packages/chrome/navigation/src/components/popover/index.tsx index b2ca81f63e7a3..265f39aa88bbb 100644 --- a/src/core/packages/chrome/navigation/src/components/popover/index.tsx +++ b/src/core/packages/chrome/navigation/src/components/popover/index.tsx @@ -194,8 +194,15 @@ export const SideNavPopover = ({ triggerRef.current?.contains(nextFocused) || popoverRef.current?.contains(nextFocused) ); const isTrappedByFlyout = (nextFocused as HTMLElement)?.classList.contains('euiFlyout'); - - if (isStayingInComponent === false && isTrappedByFlyout === false) { + const isTrappedByPageOverlay = !!(nextFocused as HTMLElement)?.closest( + '.securitySolution-pageOverlay' + ); + + if ( + isStayingInComponent === false && + isTrappedByFlyout === false && + isTrappedByPageOverlay === false + ) { handleClose(); } },