Opened 13 years ago
Closed 13 years ago
#5468 closed bug (fixed)
Bad URI causes ajaxStop and ajaxComplete not to fire
Reported by: | mrspeaker | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | ajax | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you do an Ajax request that generates a NS_ERROR_DOM_BAD_URI (or anything else that gets caught in the try/catch) then the complete() function is never run - so ajaxStop and ajaxComplete do not fire (and jQuery.active does not get decremented)
Here is a test page: http://www.mrspeaker.net/dev/jq/complete/ The call is to a "file:///" URI (the real reason I found this was running a request from the local filesystem that 404ed)
A possible patch is to simply call complete() in the catch block (diff included)
Attachments (1)
Change History (2)
Changed 13 years ago by
Attachment: | complete.diff added |
---|
comment:1 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Thanks for the patch! Just landed it: http://github.com/jquery/jquery/commit/513053d62ba86ca6ab1f4646fdac3ec6819b2db9