Bug Tracker

Opened 3 years ago

Closed 3 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 3 years ago by timmywil

  • Component changed from unfiled to deferred
  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed

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

comment:2 Changed 3 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 3 years ago by jaubourg

  • Resolution invalid deleted
  • Status changed from closed to reopened

It's actually a bug.

comment:4 Changed 3 years ago by jaubourg

  • Component changed from deferred to queue
  • Owner set to jaubourg
  • Priority changed from low to high
  • Status changed from reopened to assigned

comment:5 Changed 3 years ago by gnarf

  • Owner changed from jaubourg to gnarf

comment:6 Changed 3 years ago by gnarf

  • Milestone changed from None to 1.8.1
  • Version changed from 1.8.0 to 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 3 years ago by Corey Frang

  • Resolution set to fixed
  • Status changed from assigned to closed

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.