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
Its only a theory as it is a bit difficult to debug, bug when using packages such a simplebar, which will clone the HTML content into a structure it created, sometimes the observed node automatically becomes the second entry in the IntersectionObserver and the first one acts as if it were no longer in the DOM.
This isn't a bug created by vue-intersect but a behavior I've observed implementing IntersectionObservers manually as well.
The solution would be quite simple. At src/index.js:31 instead of assuming there is only one entry:
if(!entries[0].isIntersecting){//...
Just check all entries, stopping on the first one that is true:
Its only a theory as it is a bit difficult to debug, bug when using packages such a simplebar, which will clone the HTML content into a structure it created, sometimes the observed node automatically becomes the second entry in the
IntersectionObserver
and the first one acts as if it were no longer in the DOM.This isn't a bug created by vue-intersect but a behavior I've observed implementing IntersectionObservers manually as well.
The solution would be quite simple. At src/index.js:31 instead of assuming there is only one entry:
Just check all entries, stopping on the first one that is
true
:The text was updated successfully, but these errors were encountered: