Bug Tracker

Opened 13 years ago

Closed 12 years ago

#6633 closed bug (invalid)

exception in ajax success/complete handler doesn't decrease jQuery.active

Reported by: salomvary Owned by:
Priority: undecided Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: ajax exception active Cc:
Blocked by: Blocking:


Test case: jQuery.ajax({url:'/', complete: function() {thisWillFail()}})

After the request is complete, jQuery.active will still equal to 1. This will cause "ajaxStart" global event never triggered again.

Change History (1)

comment:1 Changed 12 years ago by addyosmani

Priority: undecided
Resolution: invalid
Status: newclosed

Referencing jQuery.active outside of the actual loop (ie. outside of the active ajax instance) will allow you to get the value of the active state minus the current instance.This can be achieved by either executing a function outside of the loop to refer to jQuery.active or use setTimeout from inside the loop to call it instead.

Note: See TracTickets for help on using tickets.