Side navigation
#6150 closed bug (fixed)
Opened February 23, 2010 01:32PM UTC
Closed September 28, 2011 03:59PM UTC
.stop sometimes doesn't clear .delay
Reported by: | cowboy | Owned by: | gnarf |
---|---|---|---|
Priority: | blocker | Milestone: | 1.7 |
Component: | effects | Version: | 1.4.1 |
Keywords: | delay,stop,setTimeout,1.7-discuss | Cc: | |
Blocked by: | Blocking: |
Description
If .stop is called after the setTimeout in .delay has executed, there's no way for that setTimeout to be stopped, so the callback executes after "time" milliseconds, no matter what.
Attachments (0)
Change History (25)
Changed June 15, 2010 12:10AM UTC by comment:1
component: | unfiled → fx |
---|
Changed November 04, 2010 04:15PM UTC by comment:2
owner: | → cowboy |
---|---|
priority: | → undecided |
status: | new → pending |
Please submit a valid test case that reproduces this issue.
Changed November 04, 2010 07:58PM UTC by comment:3
status: | pending → new |
---|
Here you go, sorry I never added this into the ticket!
Changed November 10, 2010 04:46PM UTC by comment:4
keywords: | → delay stop setTimeout |
---|---|
milestone: | 1.4.2 → 1.5 |
priority: | undecided → low |
status: | new → open |
Appreciate the test case, ben.
Changed March 30, 2011 07:19PM UTC by comment:5
owner: | cowboy → john |
---|---|
status: | open → assigned |
Changed March 30, 2011 07:49PM UTC by comment:6
milestone: | → 1.next |
---|---|
priority: | low → blocker |
Changed May 14, 2011 07:58PM UTC by comment:8
Just "me too"-ing. stop()
should stop delays. It seems like it should be really easy to implement delay()
as an animation of the given duration that doesn't actually change anything (if, unlike me, you already understand how jQuery's animation infrastructure works). That would make it play nicely with the various other animation functions (like stop()
).
Changed May 22, 2011 07:27PM UTC by comment:9
keywords: | delay stop setTimeout → delay,stop,setTimeout,1.7-discuss |
---|
Nominating ticket for 1.7 discussion.
Changed May 22, 2011 08:29PM UTC by comment:10
You could just animate a non-property
$.fn.delay = function( duration ) { return this.animate({ _: 0 }, duration);
However, This brings up a great point.... stopHooks...
There are a lot of UI effects that CANT be .stop()'ed because they don't actually use the queue... It might be nice to create some sort of method that non-standard animates can provide a function to be called on stop...
Imagine:
$.fn.delay = function( duration ) { return this.queue( function( next, onstop ) { var timer = setTimeout( next, duration ); onstop( function( gotoEnd ) { clearTimeout( timer ); if ( gotoEnd ) { next(); } }); }); };
Changed May 22, 2011 10:24PM UTC by comment:11
+1, Sounds like a bug, should be fixed
Changed May 22, 2011 11:58PM UTC by comment:12
+1, Sounds like a nasty little bug
Changed May 23, 2011 01:54AM UTC by comment:13
+1, Exterminate!
Changed May 23, 2011 03:07AM UTC by comment:14
+1, could this be fixed by simply adding the setTimeout timer to jQuery.timers?
Changed May 23, 2011 03:41PM UTC by comment:15
+1
Changed May 23, 2011 09:27PM UTC by comment:16
+1, Do not annoy the cowboy.
Changed June 03, 2011 01:27PM UTC by comment:17
+1
Changed June 03, 2011 02:29PM UTC by comment:18
+1, clearly just an implementation bug
Changed June 06, 2011 03:41PM UTC by comment:19
+1
Changed June 06, 2011 03:52PM UTC by comment:20
+1, heh
Changed July 11, 2011 09:22PM UTC by comment:21
milestone: | 1.next → 1.7 |
---|
Changed July 25, 2011 04:13PM UTC by comment:22
owner: | john → gnarf |
---|
Changed August 01, 2011 04:16PM UTC by comment:23
milestone: | 1.7 → 1.6.3 |
---|
Changed August 22, 2011 05:41PM UTC by comment:24
milestone: | 1.6.3 → 1.7 |
---|
We are currently favoring a fix for this that would include an additional parameter for delay and considering delay has always behaved this way, we're going to push this to 1.7.
Changed September 28, 2011 03:59PM UTC by comment:25
resolution: | → fixed |
---|---|
status: | assigned → closed |
Landing pull request 514. 1.7 - queue refactoring to handle delay stop - Fixes #6150.
More Details:
Changeset: a3b59d7f92c9e15af1888fc4e87639a290763a50