v0.2.1
Bug Fix
Using the previous threshold
and isIntersecting
check, in rare circumstances Firefox's IntersectionObserver implementation seems to think there is still overflow even when a container is scrolled all the way to one end.
It would report an IntersectionObserver entry with an intersectionRatio of 0 and isIntersecting of true, which doesn't really make any sense.
I suspect it's due to non-integer element sizes (like if you have an element whose width is purely based on its text content, it could get a width like 120.45).
Either adding another threshold entry of 0 and also checking intersectionRatio both seem to fix it. I'm doing both to play it safe.