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

Unnecessary & incorrect scrollbars initially visible #154

Open
ChambreNoire opened this issue Dec 22, 2021 · 0 comments
Open

Unnecessary & incorrect scrollbars initially visible #154

ChambreNoire opened this issue Dec 22, 2021 · 0 comments

Comments

@ChambreNoire
Copy link

Hi,

I have a strange problem. I'm using the react-perfect-scrollbar within the body of an AntD modal window.

Occasionally, as soon as the modal is shown, the body div is decorated with scrollbars despite the content fitting easily within the div. As soon as I click on the scrollbars or move the mouse wheel, they disappear. What's more, these scrollbars are incorrectly sized for the div. For a 600x400 div, the scrollbars take up 120 and 80 pixels respectively (that's the length of the whole scrollbar, not just the scrollable "handle" part).

Any idea what could cause this?

I tried to extract this to a sandbox project but, despite featuring all the same code, the bug does not happen here. Nevertheless, I include the project here in the hopes that, if this problem is caused by my use of RPS, this is visible here.

https://stackblitz.com/edit/react-g4ugrl?file=src%2FBaseModal.js

Thanks!

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

No branches or pull requests

1 participant