Closed vakers2 closed 1 year ago
@vakers2 Good day :)
I'm not observing this to be honest.. Are you able make a live example for me so I can inspect the issue in the browser? Also on mobile please make sure that you are not zoomed in, because otherwise the scrollbars will always appear (its impossible to hide those because those are not normal scrollbar but more of a possibility to move a zoomed in viewport)
Hi @KingSora , if you meant that you don't observe it on demo page, then these are the steps that I used in my chrome browser:
@vakers2 OverlayScrollbars evaluates its environment only once when the first instance is created. Every subsequent initialization is using the already evaluated environment.
So when you change the browsers environment (which is not really possible outside of the browsers dev tools) the plugin won't know if it already initialized within the previous environment. - This means every time you start emulating a mobile screen or a different device please also refresh the page so the plugin can adapt.
Please try it again with that knowledge and report back if it still happens.
I see, It works correctly on demo page then. Thank you. Do I need to use
cancel: {
nativeScrollbarsOverlaid: true,
}
for OverlayScrollbars to work the same way in my app?
This option will force the plugin to cancel initialization in case the native system scrollbars are overlaid already. Android
, iOS
and macOS
are systems where the system scrollbars are overlaid 99% of the time.
You can add that if you want this behavior, but you don't have to.
Thank you.
Another possible workaround is detailed in #622
Describe the bug Native scrollbar is visible on mobile view.
Expected behavior Only native or custom visible
Examples I am using this code in my project:
Also this issues exists on demo page.![image](https://github.com/KingSora/OverlayScrollbars/assets/27016370/9ded4296-6d26-4e21-863c-f58fbe872736)
Environment
Additional context Not sure if I need some additional options to fix this issue