primitives: Select inside Dialog: "Uncaught InternalError: too much recursion"

Bug report

Current Behavior

Whenever I open a Select inside a Dialog, Uncaught InternalError: too much recursion happens.

https://user-images.githubusercontent.com/13950513/191791530-162bb566-09c4-4de2-bd2c-a9cb303c94dd.mov

I created a copy of my file in CodeSandbox, and the error that appears is different. The code is exactly the same:

https://user-images.githubusercontent.com/13950513/191793302-500f3d85-06bb-4ff7-99fe-b3b7672cd267.mov

I have absolutely no clue what might be happening. As seen in CodeSandbox, I’m only using Radix-UI components.

Also: is there something I can do to improve this bug-tracking?

Expected behavior

The recursion error should not happen.

Reproducible example

Almost reproducible example

Additional context

The code in the CodeSandbox and in my page is the same. Apart from that, I’m running my page in NextJS. There’s no custom code in _app and this page has only the code in CodeSandbox.

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-dialog 1.0.0
Radix Package(s) @radix-ui/react-select 1.0.0
React n/a 17.0.2
Browser firefox 104.0.2 (64-bit)
Node n/a v16.14.2
npm/yarn yarn 1.22.19
Operating System MacOS 12.5.1 (21G83)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15

Most upvoted comments

@angelod1as @andy-hook I can reproduce the issue with both your sandboxes 100% of the time on Firefox. It does not seem that your container fix worked really.

Screenshot 2023-06-20 at 10 30 49

EDIT: We also encountered this issue in our code base with the latest versions of the primitives, and I haven’t found a solution yet. So I think this Issue should be re-opened.

(Why is this issue closed?)

Heyya, I had this issue a while ago. Back then, I was able to fix it by using the latest versions of all primitives I had. Just now I am encountering this issue again, with all the latest versions and a fresh npm install. So, I vote for reopening as well 👼