Skip to content
Prev Previous commit
Next Next commit
Fix modal closing prematurely
  • Loading branch information
ciampo committed Sep 26, 2023
commit 19192df3ad366485e427b36c731a3a6381f66fd4
7 changes: 7 additions & 0 deletions packages/components/src/dropdown-menu-v2-ariakit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ export const DropdownMenu = forwardRef< HTMLDivElement, DropdownMenuProps >(
<StyledAriakitMenu
gutter={ 8 }
shift={ menu.parent ? -9 : 0 }
getPersistentElements={ () =>
Array.from(
document.querySelectorAll(
'.components-modal__screen-overlay'
)
)
}
modal
>
{ children }
Expand Down