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
This is usually zero or larger. But the zero value is still valid and means at least 1 pixel is 'intersecting'. I've seen repeated code test just the intersectionRatio, 'intersectionRatio > 0'. This can cause some issues when scrolling because if it is zero then the test would miss the movement of the target element inside the root. I usually change the test to >= 0. I also test the isIntersecting property. I think people are using this shortcut for 'has this element moved inside the area I want to observe'. IntersectionRatio can never be less than zero? Maybe it should?
The text was updated successfully, but these errors were encountered:
This is usually zero or larger. But the zero value is still valid and means at least 1 pixel is 'intersecting'. I've seen repeated code test just the intersectionRatio, 'intersectionRatio > 0'. This can cause some issues when scrolling because if it is zero then the test would miss the movement of the target element inside the root. I usually change the test to >= 0. I also test the isIntersecting property. I think people are using this shortcut for 'has this element moved inside the area I want to observe'. IntersectionRatio can never be less than zero? Maybe it should?
The text was updated successfully, but these errors were encountered: