Jquery: Animations get skipped when old ones are stopped mid-tick

Created on 16 Jan 2017  路  7Comments  路  Source: jquery/jquery

Description

Mutation of the timer list inside a timer callback can affect the timer index, resulting in skipped callbacks.

Link to test case

https://jsfiddle.net/2v6cyorf/4/

Bug Effects

All 7 comments

@gibson042 ,
but is the animation 'C' of the test case not being skipped after the commit? I think even the #3497 has to be fixed for it to work. Is what I am assuming correct ?

Good catch, @preethi26.

@gibson042 ,
I really don't understand the difference between both the issues #3503 and #3497. Could you please clear it for me ?

3497 is more general, covering not just callback skips (#3503) but also double-callbacks of new animations. It was my intent to fix the former immediately, but the code doing so was lost somewhere along the development of PR #3496.

@gibson042, So shouldn't the fix for #3497 fix #3503? Is there any reason for them to be separate ?

It's likely that they will now be fixed together.

Pushing to 3.3.

Was this page helpful?
0 / 5 - 0 ratings