]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Don't cancel existing ajax requests when programmatically loading a tab. Fixes...
authorScott González <scott.gonzalez@gmail.com>
Tue, 17 May 2011 20:23:10 +0000 (16:23 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 17 May 2011 20:23:10 +0000 (16:23 -0400)
ui/jquery.ui.tabs.js

index b20cd9a2617ab26f2e53fb591a0aadef41627f9b..239805b146d26ffa28786b3c8090ed462a2b7ecd 100644 (file)
@@ -534,10 +534,6 @@ $.widget( "ui.tabs", {
                                panel: panel
                        };
 
-               if ( this.xhr ) {
-                       this.xhr.abort();
-               }
-
                // not remote
                if ( !url ) {
                        return;
@@ -566,7 +562,9 @@ $.widget( "ui.tabs", {
 
                                        self.lis.eq( index ).removeClass( "ui-tabs-loading" );
 
-                                       delete self.xhr;
+                                       if ( jqXHR === self.xhr ) {
+                                               delete self.xhr;
+                                       }
                                });
                }