Scrollama throws an error when steps are children of a scrollable element
Calculating the scroll direction is problematic when steps are children of a scrollable element that isn't the page scroll. This page provides an example of what not to do: do NOT place steps inside a scrollable element with overflowY: scroll or overflowY: auto and fixed height.
To demonstrate the incorrect behavior:
- ensure that the olive-colored element intersects the trigger (the dotted line)
- move the mouse pointer inside the olive-colored element
- scroll up and down with the mouse pointer inside the colored container. You may have to scroll up and down several times before the direction calculation becomes incorrect
Notice that step events are not triggered correctly when the inner container scrolls without the window element scrolling.