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

Most upvoted comments

<DropdownMenu modal={false}> solved it for me, but I don’t know why

<DropdownMenu modal={false}> solved it for me, but I don’t know why

Still helpfull thanks man

this still happens with Popovers

<DropdownMenu modal={false}> solved it for me, but I don’t know why

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”,

<DropdownMenu modal={false}> solved it for me, but I don’t know why

Worked for me as well thank you