ajaxStop was getting called too many times, separated some of the logic into the...
authorjeresig <jeresig@gmail.com>
Tue, 12 Jan 2010 15:47:00 +0000 (10:47 -0500)
committerjeresig <jeresig@gmail.com>
Tue, 12 Jan 2010 15:47:00 +0000 (10:47 -0500)
src/ajax.js

index 07e706c..e9b02fc 100644 (file)
@@ -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) { }