-
Notifications
You must be signed in to change notification settings - Fork 7
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
Animation order out of sync on second cycle #4
Labels
Comments
MrSaints
added a commit
that referenced
this issue
Apr 14, 2015
- Added 'mis-in' and 'mis-out' classes for in and out animations respectively - Moved $.one() function block to its own method for organisation - Added check in $.one() to ensure the next animation is only fired after out animations - Renamed cycle() to loop() - Simplified index counter (to one line using modulo operator)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to a report by @Netherland, we've found and reproduced a bug that occurs on several versions of Chrome (screenshot) - including
Chrome 44.0.2367.0 canary (64-bit)
and43.0.2357.10 dev-m (64-bit)
.The problem can be traced to the callback passed to jQuery's
$.one()
being called multiple times. First, after the out animation, and second, after the in animation. It should only be fired ONCE after the out animation has completed. However, Chrome fires both theanimationend
andwebkitAnimationEnd
events thereby leading to the aforementioned problem.Interestingly enough,
webkitAnimationEnd
only "starts" being fired after the first animation cycle is over. This is something I haven't really looked into yet.To resolve the issue, an in and out animation class will be applied. The listener will then check to ensure it is only "looping / cycling" the animation for out animations.
A huge thanks again to @Netherland for his time and effort in helping with this problem 👍
The text was updated successfully, but these errors were encountered: