Skip to main content

Bug Tracker

Side navigation

#6633 closed bug (invalid)

Opened June 04, 2010 09:27AM UTC

Closed October 15, 2010 03:51PM UTC

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:
Description

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.

Attachments (0)
Change History (1)

Changed October 15, 2010 03:51PM UTC by addyosmani comment:1

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.