Certain horizontal rows never load their images because IntersectionObserver occasionally reports an IntersectionRatio of 0. In my local dist I've moved to >= for the check on L195, but maybe that should be removed altogether? I'm not seeing over-firing of events or prematurely-loaded images as-is.
The row loads on intersection
10.4.x
Chromium 64
I can't share the source, but I'm using something nearly identical to the basic example in the README.
Thank you for the very well-maintained lib!
Unfortunately, modifying the ratio check means that all images are loaded immediately on the initialization of the IntersectionObserver instance -- I'm still trying to figure out how to get it to not activate initially.
This is gross and probably not ideal, but I got it working by adding state to the constructor so that the first time the IntsectionObserver calls onIntersection (when it ends up called for all target entries) it breaks:
https://gist.github.com/broguinn/b77e3d89456894ef7a719ef3bcbb47f1
One more update: to get entries to load their images that are initially visible on page load, I changed the check line to:
if (entry.intersectionRatio > 0 || _this._initialized) {
Hi @broguinn,
thanks for submitting the issue and for the analysis. I鈥檒l check everything and fix it as soon as possible.
Released 10.4.2 which fixes this.
Thanks so much!!
Most helpful comment
Thanks so much!!