Skip to content

Commit 90705cd

Browse files
committed
Tabs: Preparing for when jQuery starts always returning jqXHR objects from $.ajax().
1 parent 85639bf commit 90705cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/jquery.ui.tabs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,10 @@ $.widget( "ui.tabs", {
513513
}
514514
});
515515

516-
if ( this.xhr ) {
516+
// support: jQuery <1.8
517+
// jQuery <1.8 returns false if the request is canceled in beforeSend,
518+
// but as of 1.8, $.ajax() always returns a jqXHR object.
519+
if ( this.xhr && this.xhr.statusText !== "canceled" ) {
517520
this.lis.eq( index ).addClass( "ui-tabs-loading" );
518521

519522
this.xhr

0 commit comments

Comments
 (0)