Calling stop() within animation finished callback causes other animations to freeze
|Reported by:||camtarn||Owned by:||timmywil|
|Keywords:||animation, stop, freeze||Cc:|
The jQuery.fx tick() function removes an animation's timer from the timer list when the animation stops. However, if there is a call to stop() on the animated element within the animation's callback function, the call to stop() will remove the timer from the list and the tick() function will cause the next timer in the list to be removed instead, causing another animation on the page to freeze.
This could be solved either by documenting that stop() should not be called on the animation that fired the callback (after all, the animation is already stopped so the stop() call should not do anything), or by having tick() check that the animation which stopped is still in the queue before removing it.
I've attached a minimal test case for the bug, and a patch for tick().
Bug #4849 may be partially related to this bug.
Change History (15)
comment:3 Changed 6 years ago by
|Blocked by:||4849 added|
|Status:||new → open|
|Version:||1.4.2 → 1.4.4|
comment:12 Changed 6 years ago by
|Blocked by:||4849 removed|
|Status:||closed → reopened|