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.

This commit is contained in:
Scott González 2012-10-09 09:06:58 -04:00
parent 1e6e4ce4dc
commit fa62f21e5a

View File

@ -91,7 +91,7 @@ $.widget( "ui.tabs", {
// check for a tab marked active via a class
if ( active === null ) {
active = this.tabs.filter( ".ui-tabs-active" ).index();
active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
}
// no active tab, set to false