Skip to content

Commit 66c371a

Browse files
committed
Tabs: Allow navigating through tabs without automatic activation.
1 parent 9fc48bc commit 66c371a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ui/jquery.ui.tabs.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,13 @@ $.widget( "ui.tabs", {
178178

179179
this.lis.eq( selectedIndex ).focus();
180180
clearTimeout( this.activating );
181-
this.activating = this._delay(function() {
182-
this.option( "active", selectedIndex );
183-
// TODO: what should this delay be?
184-
}, 500 );
181+
182+
// Navigating with control key will prevent automatic activation
183+
if ( !event.ctrlKey ) {
184+
this.activating = this._delay(function() {
185+
this.option( "active", selectedIndex );
186+
}, 500 );
187+
}
185188
},
186189

187190
_panelKeydown: function( event ) {

0 commit comments

Comments
 (0)