-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Address bars on mobile browsers doesn't hide onscroll when using smooth scrollbar for whole body content #277
Comments
@amrthdivakr Did you fixed this issue? |
Put a content into a container. Set 100%+scrollWidth for the content and set overflow: hidden for the container. |
@konstantin-lysenko Hi, could you please explain what do you mean here 'Set 100%+scrollWidth for the content ' ? |
Hi, sure! Create container, |
Unfortunately that doesn't work for me. I just get extremely wide container |
Try to set calc( 100vw + width_of_scroll ) |
but thats changes width of container, the issue is when I use this plugin to whole website content address bar doesn't hide on mobile devices cause default scroll events haven't been called. |
Is anybody working on a solution for the native browser functionality to not be effected by the smooth scroll? Because we're experiencing the same issue on mobile and tablet. That the top- and bottom bar aren't scaling down on scroll. |
Hi, You can hide these divs through javascript using visibility hidden/ opacity: 0 etc. CSS direct styling won't work. This solution Worked for me. Hopefully, for you too. |
Hi! To fix this issue on my project I've used some 'hack'.
And after that I have this code:
Unfortunately this code helps only to to hide address bar when you scroll to the end of page. |
What I understood is that you want to hide that scrollbar when on tablets and mobiles. And I replied above for the same or maybe I missed something. So, the below solution works for me, and using it you can hide the bar at any breakpoint you want. if(window.matchmedia('(max-width: 1024px)').matches) {
}) |
I guess what he is trying to achieve is what I am having an issue with as well. In native scroll when using body tag, Safari, Chrome and other Browers dynamically hide top, and bottom of the browser's navigation controls to increase the viewport height while scrolling. Examples: Safari & Edge. RPReplay_Final1640453257.movRPReplay_Final1640453152.mov |
Did you guys have a solution on this? |
On Android, Chrome browser, address bar will hide when you scroll to the bottom of the page and scroll again. And will show if you came back to the top of the page, and scroll again. But on iOS, Safari browser, address bar is always visible no matter what you do, which is a problem since you can't see element that are in the bottom of the page and you can't even reload page by dragging down. Note: I'm using 100vh on main data-scrollbar element. |
any updates on this? |
Have you checked with CSS? *::-webkit-scrollbar {
display: none;
} |
So guys, no fix for this issue? |
You just need to move the scroll from the element to the HTML, the browser can't detect the scroll inside anything beside the HTML. |
Environment
Issue Summary
The address bar in mobile browsers like chrome hides on scroll down or swipe gesture, but when using smooth scrollbar for whole body content the address bar doesn't hide and I loose a lot of screen space as a result. Its not really a bug cause no actual scrolling is happening. the content in the main div is translating up and down, so the browser gets a single div of 100vh and hidden overflow.
Is there any way to work around this problem. I'm really new to smooth scrollbar and I'm not an expert with plugins either. So please help me out here.
Thanks in advance.
The text was updated successfully, but these errors were encountered: