fix: Mouse click may briefly overlap with background elements (#848)

This commit is contained in:
Przeblysk 2024-10-10 11:28:43 +08:00 committed by GitHub
parent 757f335405
commit 57e818f783
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,7 @@ export const ModalOverlay = forwardRef(
ref={ref}
id="modal-overlay"
className={cn(
"pointer-events-none fixed inset-0 z-[11] rounded-[var(--fo-window-radius)] bg-zinc-50/80 dark:bg-neutral-900/80",
"fixed inset-0 z-[11] rounded-[var(--fo-window-radius)] bg-zinc-50/80 dark:bg-neutral-900/80",
blur && "backdrop-blur-sm",
className,
)}
@ -32,6 +32,7 @@ export const ModalOverlay = forwardRef(
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
style={{ zIndex }}
onClick={(e) => e.stopPropagation()}
/>
</RootPortal>
),