Ticket #4376 (closed bug: notabug)
ui.tags add method not consistent with _tabify
| Reported by: | biaggi | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.8 |
| Component: | ui.tabs | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Despite you can use any html code in the tabs with the tabTemplate option, the _tabify method is looking for ul to insert new tabs when add method is called.
You can reproduce this error using the tabTemplate example: http://docs.jquery.com/UI/API/1.7/Tabs#option-tabTemplate
A workaround is to extend the class and overwrite that method updating that two lines with the html element you choose.
A good solution i guess would be to parse the tabTemplate option to get from there the element you need to look for.
Best regards
Change History
comment:1 Changed 4 years ago by klaus.hartl
- Status changed from new to closed
- Resolution set to invalid
comment:2 Changed 4 years ago by biaggi
What i mean is tabTemplate option in ui.tabs.js and lines 74 and 75 in that file:
this.list = this.element.children('ul:first');
this.lis = $('li:has(a[href])', this.list);
are incompatible, there is a clear inconsistence in the tabs because if you can change the single tab but cant change the container the html generated is not a valid page.
If we follow the example described in this page: http://docs.jquery.com/UI/API/1.7/Tabs#option-tabTemplate
We will get an invalid html code (<ul><div></div></ul>) is not a html valid code.
Related with #3758. Maybe in that ticket is better explained.


The tab template option is for a single tab element, while the ul is a requirement and cannot be set in that template.