-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Scrollbar breaks when overflow property is applied to <html> tag #477
Comments
Good day @stepanjakl :) I see... this comes from the fact that the browsers For now you have two options to work around this:
html.overflow-hidden,
html.overflow-hidden > body {
overflow: hidden !important;
} The I'll take a look whether I can improve this behavior without adding too much code and without adding more complexity to the plugin. |
Hello @KingSora, Thank you for the answer and detailed explanation. I definitely understand what's going on. I am using Alpine.js and its Focus plugin with When the OverlayScrollbars library isn't included on the site applying overflow property doesn't cause the jump. It would be really nice if there was some check baked into the core of the library to prevent it like you said. |
@stepanjakl I've published You can check the full changelog here Please try it out and leave me some feedback whether it works as expected |
@KingSora That was quick and it's working well now! Thanks a lot :) |
Jsem rád, že to funguje :)
|
Hahah, já také. |
Firstly, congrats on releasing v.2 @KingSora, a great library!!
Describe the bug
I have a modal component on a site and when it is open the
<html>
tag is setoverflow: hidden
property in order to disable scrolling. However, after implementing your library, when overflow gets applied the whole page automatically scrolls to the top and the scrollbar stops working.To Reproduce
You can simply test it on your official site with the Dev inspection tools and applying overflow style property to the
<html>
tag once you scrolled a bit from the top.Environment
The text was updated successfully, but these errors were encountered: