ui icon indicating copy to clipboard operation
ui copied to clipboard

Selection/Dropdown inside dialog causes memory leak in firefox

Open aslammac opened this issue 2 years ago • 6 comments

Hi, I've implemented selection inside dialog. after testing in firefox. application stops working and on the console it shows

Uncaught InternalError: too much recursion

From my analysis this is the problem of radix-ui . I've tried many methods to prevent this. Now I've mitigated issue by downgraded version from latest to

"@radix-ui/react-dialog": "1.0.4", "@radix-ui/react-dropdown-menu": "^2.0.5", "@radix-ui/react-select": "^1.2.2",

After that it works fine. if anyone faced the same and any other fixes please let me know.

Screenshot 2023-10-02 at 10 18 09 PM

aslammac avatar Oct 04 '23 03:10 aslammac

I got this problem as well and commented in #1647. Whenever I click outside of dropdowns the close event triggers twice and clicking on the select trigger again will cause the recursion error to be thrown. My guess is that z-index caused issues with closing, opening and focusing on dropdowns inside a dialog.

minhson3012 avatar Oct 04 '23 05:10 minhson3012

If it would be possible then can you assign me to this issue I want to resolve this

pragyamishra56 avatar Oct 05 '23 19:10 pragyamishra56

I got this problem as well and commented in #1647. Whenever I click outside of dropdowns the close event triggers twice and clicking on the select trigger again will cause the recursion error to be thrown. My guess is that z-index caused issues with closing, opening and focusing on dropdowns inside a dialog.

I fixed this by adding this to package.json

"resolutions": {
  "@radix-ui/react-focus-scope": "1.0.4"
}

This will force every @radix-ui/react-focus-scope dependencies to use the same version

minhson3012 avatar Oct 06 '23 02:10 minhson3012

@minhson3012 could you please assign me to this issue it would be my 1st contribution

pragyamishra56 avatar Oct 06 '23 03:10 pragyamishra56

@minhson3012 could you please assign me to this issue it would be my 1st contribution

sorry you'll have to ask the project maintainers for that

minhson3012 avatar Oct 06 '23 03:10 minhson3012

@minhson3012 How can I ask him? I mean, how is it possible to connect with them?

pragyamishra56 avatar Oct 06 '23 06:10 pragyamishra56

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Feb 25 '24 23:02 shadcn