aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ajax.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 07e706c4c..e9b02fcd9 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -455,13 +455,16 @@ jQuery.extend({
var oldAbort = xhr.abort;
xhr.abort = function() {
oldAbort.call( xhr );
- if ( xhr ) {
- xhr.readyState = 0;
- }
+
if ( !requestDone ) {
complete();
}
- onreadystatechange();
+
+ if ( xhr ) {
+ xhr.onreadystatechange = null;
+ }
+
+ requestDone = true;
};
} catch(e) { }