Scrollbar breaks when overflow property is applied to <html> tag
See original GitHub issueFirstly, 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 set overflow: 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
- Used Operating System(s): macOS
- Used Browser(s) (with version): Chrome 107
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
overflow - CSS: Cascading Style Sheets - MDN Web Docs
Overflow options include clipping, showing scrollbars, or displaying the content flowing out of its container into the surrounding area.
Read more >Overflow Issues In CSS
An overflow issue occurs when a horizontal scrollbar ... Applying CSS' outline to all elements on the page gives us a hint about...
Read more >CSS overflow property
This property specifies whether to clip content or to add scrollbars when an element's content is too big to fit in a specified...
Read more >How to prevent scrollbar from repositioning web page?
Wrap the content of your scrollable element into a div and apply padding-left: calc(100vw - 100 ...
Read more >How to prevent overflow scrolling in CSS
The CSS overflow property specifies or controls what should happen to contents that are too large to fit in an element's box.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@stepanjakl I’ve published
v2.0.1which should fix your issue 😃You can check the full changelog here
Please try it out and leave me some feedback whether it works as expected
Hahah, já také.