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.

Overflow-x: hidden on html and body causes protip not to show up when scrolled

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Tofandelcommented, Jan 16, 2019
case C.POSITION_TOP:
	this._offset.top += (globalOffset + arrowOffset.height) * -1 + document.body.scrollTop;

This gives me the correct result in the fiddle I don’t know if it would work with other use cases though

1reaction
wintercountercommented, Apr 9, 2016

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

Read more comments on GitHub >

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

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