Skip to content
Permalink
Browse files

Tabs: Ignore sublists. Fixes #5893 - Tabs: ability to contain sublists.

  • Loading branch information
ph-ausseil authored and scottgonzalez committed Aug 12, 2010
1 parent 2398f6d commit 03eea0e39dc15b5fc8c811461dd7c08b9e09f660
Showing with 24 additions and 1 deletion.
  1. +13 −0 tests/unit/tabs/tabs.html
  2. +10 −0 tests/unit/tabs/tabs_tickets.js
  3. +1 −1 ui/jquery.ui.tabs.js
@@ -93,6 +93,19 @@ <h2 id="qunit-userAgent"></h2>
<ul id="tabs5-list"></ul>
</div>
</div>
<div id="tabs6">
<ul id="tabs6-list">
<li><a href="#tabs6-1">1</a>
<ul>
<li><a href="#item6-3">3</a></li>
<li><a href="#item6-4">4</a></li>
</ul>
</li>
<li><a href="#tabs6-2">2</a></li>
</ul>
<div id="tabs6-1"></div>
<div id="tabs6-2"></div>
</div>
</div>
</body>
</html>
@@ -71,4 +71,14 @@ test('#5069 - ui.tabs.add creates two tab panels when using a full URL', functio
});


test('#5893 - Sublist in the tab list are considered as tab', function() {
// http://dev.jqueryui.com/ticket/5893
expect(1);

el = $('#tabs6').tabs();
equals(el.tabs( "length" ), 2, 'should contain 2 tab');

});


})(jQuery);
@@ -103,7 +103,7 @@ $.widget( "ui.tabs", {
fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash

this.list = this.element.find( "ol,ul" ).eq( 0 );
this.lis = $( "li:has(a[href])", this.list );
this.lis = $( " > li:has(a[href])", this.list );
this.anchors = this.lis.map(function() {
return $( "a", this )[ 0 ];
});

1 comment on commit 03eea0e

@scottgonzalez

This comment has been minimized.

Copy link
Member

@scottgonzalez scottgonzalez commented on 03eea0e Dec 11, 2013

@ph-ausseil Can you please sign our CLA?

Please sign in to comment.
You can’t perform that action at this time.