Skip to main content

Search and Top Navigation

#10034 closed bug (notabug)

Opened May 11, 2014 10:50AM UTC

Closed May 11, 2014 01:20PM UTC

Last modified May 11, 2014 01:30PM UTC

Tabs destroy normal lists

Reported by: Robotic-Brain Owned by: Robotic-Brain
Priority: minor Milestone: none
Component: ui.tabs Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:
Description

While developing for Typo3 I noticed that any list with <ul> inside a "tabbed div" is converted to tabs even though it shouldn't.

The documentation states http://api.jqueryui.com/tabs/:

The tabs themselves must be in either an ordered (<ol>) or unordered (<ul>) list
Each tab "title" must be inside of a list item (<li>) and wrapped by an anchor (<a>) with an href attribute

however this gets converted to tabs when calling $("#someCustomTabs").tabs();:

<div id="someCustomTabs">
	<ul>
		<li>Test1</li>
		<li>Test2</li>
		<li>Test3</li>
	</ul>
</div>

even multiple levels below as seen in the Typo3 backend.

Attachments (0)
Change History (4)

Changed May 11, 2014 11:57AM UTC by scottgonzalez comment:1

owner: → Robotic-Brain
status: newpending

I'm not sure why you would do that. Can you provide a scenario where it's sane to call .tabs() and not expect tabs to be created? If so, please provide a reduced test case in jsFiddle or jsbin.

Changed May 11, 2014 12:35PM UTC by Robotic-Brain comment:2

_comment0: The scenario i encountered this in was in an update script for a typo3 extension \ I'm not sure why they call .tabs() there but it affects my code (several levels down the hierarchy) in an unpleasant way \ (maybe i should file a bug there too) \ \ however it does not matter in this case: \ if there is no anchor with a href it should be ignored since a tab without content makes no sense \ \ consider this example: \ http://jsbin.com/keloliyu/1/edit?html,output \ \ of course you could call this poor design but i have no control over that :(1399811956328834
status: pendingnew

The scenario i encountered this in was in an update script for a typo3 extension

I'm not sure why they call .tabs() there but it affects my code (several levels down the hierarchy) in an unpleasant way

(maybe i should file a bug there too)

however it does not matter in this case:

if there is no anchor with a href it should be ignored since a tab without content makes no sense

consider this example:

http://jsbin.com/keloliyu/4/edit?html,output

of course you could call this poor design but i have no control over that :(

Changed May 11, 2014 01:20PM UTC by scottgonzalez comment:3

resolution: → notabug
status: newclosed

This is working as intended, tabs always use the first descendant list by default. I don't think we want to complicate the search for the list, especially since it's customizable though the _getList() extension point and very few people run into this problem.

Changed May 11, 2014 01:30PM UTC by Robotic-Brain comment:4

Then it really is a Typo3 bug...

For reference: http://forge.typo3.org/issues/58697