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 (13)
comment:3 Changed 5 years ago by snover
- Blocked by 4849 added
- Priority set to low
- Status changed from new to open
- Version changed from 1.4.2 to 1.4.4
comment:4 Changed 5 years ago by timmywil
- Milestone set to 1.next
- Version changed from 1.4.4 to 1.6b1
comment:8 Changed 5 years ago by timmywil
- Resolution set to fixed
- Status changed from assigned to closed
comment:12 Changed 5 years ago by timmywil
- Blocked by 4849 removed
- Resolution fixed deleted
- Status changed from closed to reopened