Bug Tracker

Opened 4 years ago

Closed 4 years ago

#15247 closed bug (migrated)

Deferred API: deferred.progress() is still available after the deferred object resolved or rejected

Reported by: yuuuuc Owned by:
Priority: undecided Milestone: None
Component: deferred Version: 2.1.1
Keywords: deferred, progress, notify Cc:
Blocked by: Blocking:

Description

As the jQuery documentation say in http://api.jquery.com/deferred.notify/:

Any calls to .notify() after a Deferred is resolved or rejected (or any progressCallbacks added after that) are ignored.

But when i read jQuery source code, the progressCallback is just locked when the deferred object is resolved or rejected. So if the .notify() was not called before we call .resolve() or .reject(), the progressCallback will be disabled, but if the .notify() was called before we call .resolve() or .reject(), the progressCallback was just locked.

This issue exist in 1.8-edge version of jQuery.

You can check out the code example here:

http://jsfiddle.net/yuuuuc/zez5dtpv/3/

Change History (1)

comment:1 Changed 4 years ago by m_gol

Resolution: migrated
Status: newclosed
Note: See TracTickets for help on using tickets.