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

Native scrollbars partially showing on zoom #41

Open
nabsta-eth opened this issue Jan 3, 2023 · 2 comments
Open

Native scrollbars partially showing on zoom #41

nabsta-eth opened this issue Jan 3, 2023 · 2 comments

Comments

@nabsta-eth
Copy link

nabsta-eth commented Jan 3, 2023

Great product, but we had to stop using it in some key places in our live app for the reason below. I'd like to reinstate it evrywhere because I personally hate the native scroll bars and like to make them consistent wi the app theme and consistent across all desktop platforms.

We are/were using v4.5.0.

When zooming out, the native scrollbars are just showing at some percentages (not all).
Both vertical and horizontal show when this is the case because the calculation of the negative margins must be slightly off.
image

Hopefully it is a reltively quick/easy fix.

Regards
David

@nabsta-eth nabsta-eth changed the title Native scrollbars partially showing Native scrollbars partially showing on zoom Jan 4, 2023
@nabsta-eth
Copy link
Author

nabsta-eth commented Jan 4, 2023

Sorry, forgot to mention. This is Chrome.
Actually, here's a situation where the content required no horizontal scrollbar but does have a vertical one, but we still see a white remnant and the vertical is correct. This is at 80% zoom.
margin-bottom: -22px is needed instead of the set -21px, but the margin-right: -21px as set is fine...
Even -21.5px it's happy with...
It seems to depend on the screen resolution. Lower res monitors (e.g. my HP 25x) have the issue where full HD (e.g. my Dell XPS 15 laptop screen) does not.
image

@pipje2001
Copy link

I just ran into the same issue, but I don't know if this is easy to fix, after some testing it does show that the normal scrollbar is 15px wide (default for my browser) and thus the custom scrollbars has a margin of 15px but still it shows this small line. After looking at the internal code of react-custom-scrollbars-2 it calculated the width of the scrollbar exactly the same way as I did.

So I dont think this is a issue with react-custom-scrollbars-2 but rather a html render issue that either: makes the default scrollbar just slightly bigger OR makes the negative margin slightly smaller

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

2 participants