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
jQuery.fx.tick executes each queued timer in turn, maintaining its place when it removes a finished animation. However, .stop and .finish can also remove timers from the queue, and when invoked while tick is iterating (i.e., from animation callbacks) can cause it to lose its place, skipping over one or more animations. This is often harmless (since the animation is revisited in the next tick), but can introduce visible stutter or (in a pathological case that I didn't bother demonstrating) starve an animation outright.
Additionally, because tick iterates to the end of the queue, new animations get processed twice in their first tick.
We should fix both by making the three functions more aware of and cooperative with each other.
Description
jQuery.fx.tick
executes each queued timer in turn, maintaining its place when it removes a finished animation. However,.stop
and.finish
can also remove timers from the queue, and when invoked whiletick
is iterating (i.e., from animation callbacks) can cause it to lose its place, skipping over one or more animations. This is often harmless (since the animation is revisited in the next tick), but can introduce visible stutter or (in a pathological case that I didn't bother demonstrating) starve an animation outright.Additionally, because
tick
iterates to the end of the queue, new animations get processed twice in their first tick.We should fix both by making the three functions more aware of and cooperative with each other.
Link to test cases
The text was updated successfully, but these errors were encountered: