]> source.dussan.org Git - jquery.git/commitdiff
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 07e706c4c5fb55b9cb9ceb90d968e5438ee94fa0..e9b02fcd905d5031ec8ebc3a845e40a825e87699 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) { }