Overflow-x: hidden on html and body causes protip not to show up when scrolled
See original GitHub issueI think this is a bug. If I add overflow-x: hidden
to my CSS and I have protips that go beyond the top fold of the page, the bottom protips show up but in their original non-scrolled location and thus can’t even be seen on the screen.
Here’s an example and if you scroll down in render area and hover over any of the Tip words near the bottom of page, you won’t see a protip: https://jsfiddle.net/ouamhaw9/4/
And here it works when I comment out overflow-x: hidden
:
https://jsfiddle.net/ouamhaw9/5/
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
css - Overflow-x:hidden doesn't prevent content from ...
Creating a site wrapper div inside the <body> and applying the overflow-x:hidden to the wrapper instead of the <body> or <html> fixed the...
Read more >overflow-x - CSS: Cascading Style Sheets - MDN Web Docs
The overflow-x CSS property sets what shows when content overflows ... If overflow-y is hidden , scroll or auto and this property is...
Read more >Problem with animate(scrollTop) and css overflow-x hidden ...
I was trying to implement animated scroll with anchor links using ... Overflow-x: hidden on html and body causes protip not to show...
Read more >Finding/Fixing Unintended Body Overflow - CSS-Tricks
Another minor little trick that helps me sometimes is to scroll over so you can see offending overflow area, and then click and...
Read more >Overflow Issues In CSS - Smashing Magazine
An overflow issue occurs when a horizontal scrollbar unintentionally appears on a web page, allowing the user to scroll horizontally. It can be ......
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 FreeTop 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
Top GitHub Comments
This gives me the correct result in the fiddle I don’t know if it would work with other use cases though
Seems like this is a Chrome bug. If overflow-x is applied both to html and body, Chrome will report
document.body.scrollTop
to be 0. It’s a known bug. If you remove overflow-x only from the html element, it’ll work just fine. Te be honest I don’t know how should I fix this without having proper metrics, it even breaks jQuery also 😦 I leave this issue open so anyone with the same issue can see this, but no fix will be done by me.https://jsfiddle.net/4frs821y/ https://github.com/jquery/jquery/issues/2215#issuecomment-94332101