react-waypoint
react-waypoint copied to clipboard
Horizontally scrolled ancestor picked up as `scrollableAncestor`
I have a structure similar to this:
<body>
<div style="overflow-x: auto; width: 300px">
<Waypoint onEnter={doSomething}/>
</div>
</body>
I was expecting the scrollableAncestor to be resolved to window here, but it ends up being the parent div.
I think this happens because an element with overflow-x: auto will force some browsers to also set overflow-y: auto.
This provides more insight: https://stackoverflow.com/questions/18135204/setting-overflow-y-causes-overflow-x-to-change-as-well
Not sure if there's anything react-waypoint can do to work around this.
Related to #251.