Bug Tracker

Opened 5 years ago

Closed 5 years ago

#12278 closed bug (fixed)

.promise(type) not working for non-default queue

Reported by: creativecouple Owned by: gnarf
Priority: high Milestone: 1.8.1
Component: queue Version: 1.6.3
Keywords: Cc:
Blocked by: Blocking:


On http://jsfiddle.net/creativecouple/3Y63M/1/ I have an example with .promise(type). There is one element animated (.delay) with the default queue 'fx' and the other one with another queue 'foo'.

As you can see .promise(type) don't wait for the non-default queue to finish, but it does for the default case. Why?

This is the same for any jQuery version from 1.6.0 up to 1.8.0

Change History (7)

comment:1 Changed 5 years ago by timmywil

Component: unfileddeferred
Priority: undecidedlow
Resolution: invalid
Status: newclosed

This is a forum question. If this is a bug or enhancement request, it needs to be fleshed out more.

comment:2 Changed 5 years ago by creativecouple

Why is this not a bug?

Ok, minimal example:

$('span').animate{{left:'+=100px'},{queue:'myfx'}).dequeue('myfx'); $('span').promise('myfx') is now resolved. This is a bug!

$('span').promise('myfx') must resolve only after the animation finished. But it is resolved immediately.

comment:3 Changed 5 years ago by jaubourg

Resolution: invalid
Status: closedreopened

It's actually a bug.

comment:4 Changed 5 years ago by jaubourg

Component: deferredqueue
Owner: set to jaubourg
Priority: lowhigh
Status: reopenedassigned

comment:5 Changed 5 years ago by gnarf

Owner: changed from jaubourg to gnarf

comment:6 Changed 5 years ago by gnarf

Milestone: None1.8.1

https://github.com/jquery/jquery/pull/893 should fix this - It requires editing some of our unit tests though, so we should take some care with it.

comment:7 Changed 5 years ago by Corey Frang

Resolution: fixed
Status: assignedclosed

Fix #12278. Promises on non-default queue wait until a dequeue is attempted on an empty queue. Close gh-893.

Changeset: 3812f9436da09d9f31ca4a61a14cd70f3e8cbeaf

Note: See TracTickets for help on using tickets.