fix: Fixed issue where some dialogs would become unresponsive
This commit is contained in:
@@ -14,7 +14,14 @@ const AlertDialog = ({
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog store={dialog} role="alertdialog" className="fixed top-0 left-0 z-modal h-full w-full">
|
<Dialog
|
||||||
|
store={dialog}
|
||||||
|
role="alertdialog"
|
||||||
|
className="fixed top-0 left-0 z-modal h-full w-full"
|
||||||
|
modal={false}
|
||||||
|
portal={true}
|
||||||
|
preventBodyScroll={true}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className="absolute z-0 h-full w-full bg-passive-5 opacity-25 md:opacity-75"
|
className="absolute z-0 h-full w-full bg-passive-5 opacity-25 md:opacity-75"
|
||||||
role="presentation"
|
role="presentation"
|
||||||
|
|||||||
@@ -32,11 +32,9 @@ const ModalOverlay = forwardRef(
|
|||||||
className="fixed top-0 left-0 z-modal h-full w-full"
|
className="fixed top-0 left-0 z-modal h-full w-full"
|
||||||
ref={mergeRefs([setElement, ref])}
|
ref={mergeRefs([setElement, ref])}
|
||||||
store={dialog}
|
store={dialog}
|
||||||
getPersistentElements={() =>
|
modal={false}
|
||||||
Array.from(document.querySelectorAll('[role="dialog"], [role="alertdialog"]')).map((el) => {
|
portal={true}
|
||||||
return el.parentElement ? el.parentElement : el
|
preventBodyScroll={true}
|
||||||
})
|
|
||||||
}
|
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Reference in New Issue
Block a user