Skip to content
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

jQuery.fx.tick insufficiently guards against timer queue manipulation #3497

Open
gibson042 opened this issue Jan 12, 2017 · 2 comments
Open
Milestone

Comments

@gibson042
Copy link
Member

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 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.

Link to test cases

preethi26 added a commit to preethi26/jquery that referenced this issue Jan 16, 2017
…Handled repeated execution of animation in first tick. Fixes jquery#3497.
preethi26 added a commit to preethi26/jquery that referenced this issue Jan 16, 2017
preethi26 added a commit to preethi26/jquery that referenced this issue Jan 16, 2017
…Handled repeated execution of animation in first tick. Fixes jquery#3497.

corrected syntax error

Fixes jquery#3497

Fixed. jquery#3497
@timmywil timmywil added this to the 4.0.0 milestone Feb 13, 2017
@timmywil timmywil modified the milestones: 4.0.0, 3.7.0 Aug 26, 2022
@timmywil timmywil modified the milestones: 3.7.0, 4.1.0 Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants
@timmywil @gibson042 and others