Skip to main content

Bug Tracker

Side navigation

#6299 closed bug (duplicate)

Opened March 16, 2010 06:18PM UTC

Closed October 01, 2010 03:15AM UTC

Last modified March 14, 2012 01:20AM UTC

jQuery 1.4.2 breaks AJAX success/failure behaviour

Reported by: damian.biollo Owned by:
Priority: undecided Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

There is a small change to the behaviour of httpSuccess() which breaks the behaviour of AJAX in Firefox.

The breakage is in the scenario when a user clicks a link while an AJAX request is being processed. In Firefox, clicking a link to navigate will immediately cancel all outstanding HTTP requests. (Check Firebug Console to see the behaviour).

In previous versions of jQuery, this would result in a "failure" - the failure ajax handler would be called.

In 1.4.2 this results in the "success" handler being called, which seems quite wrong.

The bug is due to adding a condition of "or xhr.status == 0" to the httpSuccess function.

Attachments (0)
Change History (4)

Changed March 30, 2010 02:46AM UTC by guest comment:1

Similarly, xhr.status == 0 when connection to the server fails so the success callback runs.

Changed June 15, 2010 12:55AM UTC by dmethvin comment:2

component: unfiledajax

Changed June 15, 2010 08:20PM UTC by snover comment:3

This is a duplicate of bug #6060.

Changed October 01, 2010 03:15AM UTC by addyosmani comment:4

priority: → undecided
resolution: → duplicate
status: newclosed

This is one of the bugs that was successfully addressed in #6060. As a fix for it will likely be included in 1.4.3, I am closing this ticket and assigning it duplicate status.