You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sairaj-Aftab
changed the title
[bug]: Popover cannot be worked properly inside Dialog
[bug]: Popover cannot be worked properly inside Dialog with React 19
Jan 9, 2025
I also encountered the same issue, and I believe the problem lies in the conflict between the dialog Portal and popover Portal. I worked around it by creating a new file, duplicating the popover file, and removing <PopoverPrimitive.Portal>.
Describe the bug
just example code here:
<Dialog> <DialogTrigger asChild> <Button>Open Dialog</Button> </DialogTrigger> <DialogContent> <DialogHeader> <DialogTitle>Are you absolutely sure?</DialogTitle> <Popover> <PopoverTrigger asChild className="flex-1 flex gap-2 flex-col justify-start" > <Button> <Input type="text" /> </Button> </PopoverTrigger> <PopoverContent className="flex flex-col gap-2 w-80"> <Input type="text" placeholder="more.." /> <Input type="text" placeholder="more.." /> <Input type="text" placeholder="more.." /> <Input type="text" placeholder="more.." /> </PopoverContent> </Popover> </DialogHeader> </DialogContent> </Dialog>
Affected component/components
Popover
How to reproduce
Click on
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: