File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,11 @@ asyncTest( "spinner", function() {
156
156
equals ( element . find ( ".ui-tabs-nav li:eq(2) em" ) . length , 1 , "beforeload" ) ;
157
157
} ) ;
158
158
element . one ( "tabsload" , function ( event , ui ) {
159
- equals ( element . find ( ".ui-tabs-nav li:eq(2) em" ) . length , 0 , "load" ) ;
160
- start ( ) ;
159
+ // wait until after the load finishes before checking for the spinner to be removed
160
+ setTimeout ( function ( ) {
161
+ equals ( element . find ( ".ui-tabs-nav li:eq(2) em" ) . length , 0 , "load" ) ;
162
+ start ( ) ;
163
+ } , 1 ) ;
161
164
} ) ;
162
165
element . tabs ( "option" , "active" , 2 ) ;
163
166
} ) ;
Original file line number Diff line number Diff line change @@ -621,6 +621,7 @@ $.widget( "ui.tabs", {
621
621
this . xhr
622
622
. success ( function ( response ) {
623
623
panel . html ( response ) ;
624
+ self . _trigger ( "load" , event , eventData ) ;
624
625
} )
625
626
. complete ( function ( jqXHR , status ) {
626
627
if ( status === "abort" ) {
@@ -631,13 +632,11 @@ $.widget( "ui.tabs", {
631
632
// "tabs" queue must not contain more than two elements,
632
633
// which are the callbacks for the latest clicked tab...
633
634
self . element . queue ( "tabs" , self . element . queue ( "tabs" ) . splice ( - 2 , 2 ) ) ;
634
-
635
- delete this . xhr ;
636
635
}
637
636
638
637
self . lis . eq ( index ) . removeClass ( "ui-tabs-loading" ) ;
639
638
640
- self . _trigger ( "load" , event , eventData ) ;
639
+ delete self . xhr ;
641
640
} ) ;
642
641
}
643
642
You can’t perform that action at this time.
0 commit comments