aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tabs.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-10-10 15:34:47 -0400
committerScott González <scott.gonzalez@gmail.com>2011-10-10 15:34:47 -0400
commitfa26847f910ec32bf59fe6dc839e81e5dfce8247 (patch)
tree1a7df8f1f295eabaccaedf64e42189e93f0e6029 /ui/jquery.ui.tabs.js
parent8961508128b01331942630d7f47b0428608c5b01 (diff)
downloadjquery-ui-fa26847f910ec32bf59fe6dc839e81e5dfce8247.tar.gz
jquery-ui-fa26847f910ec32bf59fe6dc839e81e5dfce8247.zip
Tabs: Force ajax tabs to resolve asynchronously to avoid a bug caused by cached XHRs resolving immediately in IE.
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rw-r--r--ui/jquery.ui.tabs.js30
1 files changed, 19 insertions, 11 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index a1bf72cb1..4127ddf84 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -541,19 +541,27 @@ $.widget( "ui.tabs", {
this.xhr
.success(function( response ) {
- panel.html( response );
- self._trigger( "load", event, eventData );
+ // TODO: IE resolves cached XHRs immediately
+ // remove when core #10467 is fixed
+ setTimeout(function() {
+ panel.html( response );
+ self._trigger( "load", event, eventData );
+ }, 1 );
})
.complete(function( jqXHR, status ) {
- if ( status === "abort" ) {
- self.panels.stop( false, true );
- }
-
- self.lis.eq( index ).removeClass( "ui-tabs-loading" );
-
- if ( jqXHR === self.xhr ) {
- delete self.xhr;
- }
+ // TODO: IE resolves cached XHRs immediately
+ // remove when core #10467 is fixed
+ setTimeout(function() {
+ if ( status === "abort" ) {
+ self.panels.stop( false, true );
+ }
+
+ self.lis.eq( index ).removeClass( "ui-tabs-loading" );
+
+ if ( jqXHR === self.xhr ) {
+ delete self.xhr;
+ }
+ });
});
}