Skip to content

Commit fa62f21

Browse files
committed
Tabs: Handle extraneous list items when using ui-tabs-active to set the initially active tab. Fixes #8568 - jQuery ui tabs: wrong default active li if ul contains extraneous elements.
1 parent 1e6e4ce commit fa62f21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.tabs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ $.widget( "ui.tabs", {
9191

9292
// check for a tab marked active via a class
9393
if ( active === null ) {
94-
active = this.tabs.filter( ".ui-tabs-active" ).index();
94+
active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
9595
}
9696

9797
// no active tab, set to false

0 commit comments

Comments
 (0)