You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case was to change the height of a footer if a step is entered on direction: down and reset the it on exit and direction: up.
Sometimes the event is not fired and the footer remains on the last state. It's hard to debug because it doesn't happen regularly
The text was updated successfully, but these errors were encountered:
I updated the codesandbox but it looks there is still a problem.
Maybe the problem is related to the value of the offset. If I choose a offset smaller than 0.7 e.g. 0.6 onStepEnter/onStepExit is not triggered at all in the example. If I choose a bigger value like 0.8 e.g. 0.9 it is triggered twice and then sometimes I get direction === 'up' when scrolling down (for the latest trigger).
In the range from 0.7 - 0.8 it looks like everything is working like it should. Perhaps multiple fired steps add some confusion to this function https://github.com/russellgoldenberg/scrollama/blob/main/src/scroll.js#L6
If scrolling down and up multiple times, it happens sometimes that
onStepEnter/onStepExit
is not triggered.Setting:
I have created a codesandbox
My use case was to change the height of a footer if a step is entered on
direction: down
and reset the it on exit anddirection: up
.Sometimes the event is not fired and the footer remains on the last state. It's hard to debug because it doesn't happen regularly
The text was updated successfully, but these errors were encountered: