fix: always mount popover backdrop portal to prevent remount issues
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
330152fd5c
commit
e5e0918c93
1 changed files with 6 additions and 5 deletions
|
|
@ -26,8 +26,8 @@ const Popover = ({
|
|||
|
||||
return (
|
||||
<>
|
||||
{open &&
|
||||
createPortal(
|
||||
{createPortal(
|
||||
open ? (
|
||||
<div
|
||||
ref={backdropRef}
|
||||
className="pointer-events-auto fixed inset-0 z-40"
|
||||
|
|
@ -35,9 +35,10 @@ const Popover = ({
|
|||
e.stopPropagation()
|
||||
handleOpenChange(false)
|
||||
}}
|
||||
/>,
|
||||
document.body
|
||||
)}
|
||||
/>
|
||||
) : null,
|
||||
document.body
|
||||
)}
|
||||
<PopoverPrimitive.Root {...props} open={open} onOpenChange={handleOpenChange} modal={false} />
|
||||
</>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue