This library has been very useful but there's a small functionality issue with partialVisibility that I'm not sure works as intended.
When partialVisibility is set to 'bottom', the sensor triggers when the bottom of the element is visible (as desired). But then, when the user scrolls away from the element, to the point that the card is out of the viewport, the sensor still claims the element is visible.
In the below demo, try changing partialVisibility to 'bottom' then scroll below the red bar. You'll observe that the output claims "Contained Element is now visible"
Hello!
This library has been very useful but there's a small functionality issue with partialVisibility that I'm not sure works as intended.
When partialVisibility is set to 'bottom', the sensor triggers when the bottom of the element is visible (as desired). But then, when the user scrolls away from the element, to the point that the card is out of the viewport, the sensor still claims the element is visible.
In the below demo, try changing partialVisibility to 'bottom' then scroll below the red bar. You'll observe that the output claims "Contained Element is now visible"
https://codepen.io/joshwnj/pen/PjwVym