question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scrollbar breaks when overflow property is applied to <html> tag

See original GitHub issue

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 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.

Screenshot 2022-11-16 at 23 39 24

Environment

  • Used Operating System(s): macOS
  • Used Browser(s) (with version): Chrome 107

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
KingSoracommented, Nov 17, 2022

@stepanjakl I’ve published v2.0.1 which 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

0reactions
stepanjaklcommented, Nov 17, 2022

Jsem rád, že to funguje 😃

Glad it works 😃

Hahah, já také.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found