id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,blocking,blockedby
6576,delay() and clearQueue() combination is problematic and incorrect,JurekRaben,,"Try this code:

$(""element"").delay(800).fadeOut(400);

$(""element"").clearQueue();

$(""element"").delay(8000).fadeTo(0,1).fadeTo(400,0.5);

The first queue with delay(800) will be cleared by clearQueue(). The new queue with delay(8000) will be executed with the delay value 800 of the first queue and not with 8000!

I think this bug can cause a lot of confusion and should be fixed.

In my opinion this happens because the return value of setTimeout in queue.js is not saved and won't be cleared with clearTimeout() in clearQueue().

If the second queue wasn't there, delay() would be still executed, but result in no operation, because the queue of the element would be empty. But the second delay-queue now again fills the queue of the element. So the first delay, not properly killed, will execute the next queue element of the second queue by execute jQuery.dequeue()...

Of course the second delay will execute too, no matter of clearQueue()-calls. This furthermore will cause lots of confusion.
",bug,closed,undecided,,queue,1.4.2,duplicate,needsreview,,,
