Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jumpy Bug #21

Closed
QJan84 opened this issue Jul 18, 2019 · 1 comment
Closed

Jumpy Bug #21

QJan84 opened this issue Jul 18, 2019 · 1 comment

Comments

@QJan84
Copy link

QJan84 commented Jul 18, 2019

I found a bug! The bug can also be seen on the demo website: https://mciastek.github.io/sal/

Once an item reaches the top / bottom of the screen, the class ".sal-animation" is added and removed in a loop. This causes the item to fade in and out over and over again.

The bug is not always visible. Seemingly only at a certain scroll position.

@QJan84 QJan84 changed the title Jumpy Bug: Jumpy Bug Jul 18, 2019
@mciastek
Copy link
Owner

Unfortunately, it's related to how IntersectionObserver works. Basically, it checks if any pixel of the observed element is present in viewport. This means that if you move the element by some pixel below the threshold, but it's still in viewport it falls into animation loop. The one way to avoid it is to attach observer to element's parent, so the position of observed stays the same. This bug affects only transform based animation. I'm open to any suggestions how to resolve this bug.

It duplicates #3, so I'm closing this issue. Please leave comment in related issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants