Opened 7 years ago
Closed 7 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: |
Description
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 7 years ago by
| Component: | unfiled → deferred |
|---|---|
| Priority: | undecided → low |
| Resolution: | → invalid |
| Status: | new → closed |
comment:2 Changed 7 years ago by
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:4 Changed 7 years ago by
| Component: | deferred → queue |
|---|---|
| Owner: | set to jaubourg |
| Priority: | low → high |
| Status: | reopened → assigned |
comment:5 Changed 7 years ago by
| Owner: | changed from jaubourg to gnarf |
|---|
comment:6 Changed 7 years ago by
| Milestone: | None → 1.8.1 |
|---|---|
| Version: | 1.8.0 → 1.6.3 |
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 7 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fix #12278. Promises on non-default queue wait until a dequeue is attempted on an empty queue. Close gh-893.
Changeset: 3812f9436da09d9f31ca4a61a14cd70f3e8cbeaf

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