]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Preparing for when jQuery starts always returning jqXHR objects from $.ajax().
authorScott González <scott.gonzalez@gmail.com>
Wed, 16 May 2012 21:14:50 +0000 (17:14 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 16 May 2012 21:14:50 +0000 (17:14 -0400)
ui/jquery.ui.tabs.js

index 7198a4180df431a7d04f88094fb3535e4733e0b8..8a6b2ba2e53adbeab45757fa9d284ff84cf21728 100644 (file)
@@ -513,7 +513,10 @@ $.widget( "ui.tabs", {
                        }
                });
 
-               if ( this.xhr ) {
+               // support: jQuery <1.8
+               // jQuery <1.8 returns false if the request is canceled in beforeSend,
+               // but as of 1.8, $.ajax() always returns a jqXHR object.
+               if ( this.xhr && this.xhr.statusText !== "canceled" ) {
                        this.lis.eq( index ).addClass( "ui-tabs-loading" );
 
                        this.xhr