Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-remove-scroll keeps give me warnings after use the Select in the Dialog component #2395

Closed
abbazabacto opened this issue Sep 19, 2023 Discussed in #1594 · 1 comment

Comments

@abbazabacto
Copy link

The console error in the linked discussion can be prevented by upgrading the react-remove-scroll to version 2.5.6 which includes the fix of react-remove-scroll-bar version 2.3.4.

For example in the Dialog package.json

Without this upgrade I need to use module resolution to enforce react-remove-scroll version 2.5.6 to prevent the console error to appear in my console.

Discussed in #1594

Originally posted by JhonM August 3, 2022
Hi,

When I use a Select component inside the Dialog, I get an error when clicking the Select trigger.

react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body 
    at RemoveScrollBar (http://localhost:3000/project-x/index.js:45320:29)
    at RemoveScrollSideCar (http://localhost:3000/project-x/index.js:45444:37)

I noticed that react-remove-scroll adds an overflow hidden on the body element that is causing this error. Is there any solution how to fix this?

For clarification I created a sandbox where I could reproduce it: https://codesandbox.io/s/select-in-dialog-primitive-react-remove-scroll-error-dfkobw

Thank You in advance and keep up the great work!

Jhon

@benoitgrelard
Copy link
Collaborator

Duplicate of #2367

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants