There is a bug in determining an intersection when the threshold option is missing or equal to 0(which is the default value according to specs).
Actual result:
Since in Chrome(Version 70.0.3538.110 and previous builds as well) intersection event for a target element fires only once with an intersectionRatio equal to 0 - wrapped component never get loaded;
As a solution to this problem, I would suggest using isIntersecting attribute which is true if the target intersects with the root. I have already tested that code and it gives the result for an entry: isIntersecting === true && intersectionRatio === 0;
Expected result:
Elements with missing or zero thresholds should be loaded correctly - it could be useful for lazy loading images;
There is a bug in determining an intersection when the threshold option is missing or equal to 0(which is the default value according to specs).
Actual result:
Version 70.0.3538.110
and previous builds as well) intersection event for a target element fires only once with anintersectionRatio
equal to0
- wrapped component never get loaded;isIntersecting
attribute which istrue
if the target intersects with the root. I have already tested that code and it gives the result for an entry:isIntersecting === true && intersectionRatio === 0
;Expected result: