scrollama.js

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:

Notice that step events are not triggered correctly when the inner container scrolls without the window element scrolling.