-
Notifications
You must be signed in to change notification settings - Fork 14
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
Scrollbars not visible when disabling native ones #23
Comments
Because the scrollbars can differ in browsers/OS we need to measure the native scrollbar size before we hide it and display the custom one (so that we know how much there is to hide). |
@Denny966 - we haven't heard from sakhnyuk yet, but yeah, the idea behind rc-scrollbars (credit to https://github.com/malte-wessel) is that when you use it, you do not have to make an extra effort of disabling the native ones. They're just not visible. |
I've worked around the issue by specifying the css to the div instead of the whole page. And you can close it if you want. But imo, the issue is still there because people expect the scrollbars from the library to be visible even when disabling the one of the browser with the mentioned css. |
Hey guys! @Denny966 @Tomassito The main problem here is not about scrollbars visibility while
I think we can try to skip the native scrollbar width check and hide 20-25px on the right side and on the bottom (with RTL left and bottom). |
@sakhnyuk If there's no native ones = there's nothing to hide, so no reason for negative margins, hm? |
But it doesn't mean that native scrollbars don't render. MacOS and phones render it over the block (and scrollbar block is 0) |
check this one: https://github.com/KingSora/OverlayScrollbars It works the same on OSX/Windows, with autohide (OSX/iOS) or without(OSX/Windows). That was the main reason to switch from this package to overlay, even it has a bigger size and harder to customize :( but consistency on all platforms is critical. There is also another react version: https://github.com/rommguy/react-custom-scroll |
@plandem Hey 👋 I have some plans for future updates. One of the most important is adding scrollbars on all platforms. |
@sakhnyuk overlay supports iframes and textarea. Almost the only solution that supports it. At least out of the box. But consistency across browsers/os is more critical than iframe or textarea. |
I've disabled the native scrollbars with css on the whole page:
But then the scrollbars from the library also disappears. Is it by design to also hide the custom ones when add the css above?
My point was to use custom scrollbars while disabling the native one...
https://codesandbox.io/s/react-playground-forked-9crjf
The text was updated successfully, but these errors were encountered: