ui: Popover causing whole page to freeze
Hi. I am trying to use Popover component inside of Dialog component, based on dashboard example. When I copy paste code, opening this dialog causes whole page to freeze. When I delete everything and leave code as this
<Dialog open={showNewTeamDialog} onOpenChange={setShowNewTeamDialog}>
<Popover>
<PopoverTrigger>trigger</PopoverTrigger>
<PopoverContent>Place content for the popover here.</PopoverContent>
</Popover>
</Dialog>
it works and open popover correctly. As soon as I add props like open or onOpenChange, I get this freezing state. Also when I add something inside of PopoverTrigger, like Button, and set PopoverTrigger ‘asChild’ prop, same freezing happens.
Nextjs v13.4.3 @radix-ui/react-popover v1.0.6
I have followed manual installation of all components, I’ve already used some of them and everything is working. I would like to use this popover same way, as it is used in dashboard example. Can you help me with this?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 16
- Comments: 19 (1 by maintainers)
Commits related to this issue
- fix: update `PinInput` form (#544) * fix: update default modelValue for Pin input * fix: update `vee-validate` pin-input setValue * chore: run `build:registry` command — committed to u007/ui by hrynevychroman 3 years ago
- Fix issue with page freezing by hack https://github.com/shadcn-ui/ui/issues/544#issuecomment-1836353580 — committed to codegasms/mint by aahnik 2 years ago
<DropdownMenu modal={false}>solved it for me, but I don’t know whyStill helpfull thanks man
this still happens with Popovers
It works for me too 👍
The DropdownMenu relies on @radix-ui/react-dropdown-menu. I didn’t have the issue (i.e. freeze screen after closing the form) with version 2.0.6. In my case, the issue seems to be in “@radix-ui/react-dropdown-menu”: “^2.1.2”,
Worked for me as well thank you