Skip to main content

Search and Top Navigation

#5654 closed bug (notabug)

Opened May 25, 2010 01:04PM UTC

Closed June 15, 2010 01:21PM UTC

Last modified October 11, 2012 09:15PM UTC

Nested tabs repeatedly fire tabselect event

Reported by: Greg Owned by:
Priority: minor Milestone:
Component: ui.tabs Version: 1.7.2
Keywords: Nestedtabs tabselect Cc:
Blocked by: Blocking:
Description

When a tab is nested within another tab, the tabselect event fires first on the child tab, and then erroneously on the parent tab, where nothing is changed, and the ui object passed references the child tab, rather than the parent. Example code:

<div id="mainTab">

<ul>

<li><a href="#tab1"><span>Tab1</span></a></li>

<li><a href="#tab2"><span>Tab2</span></a></li>

</ul>

<div id="tab1">

<div id="subTab1">

<ul>

<li><a href="#tab1_1"><span>Tab1.1</span></a></li>

<li><a href="#tab1_2"><span>Tab1.2</span></a></li>

</ul>

<div id="tab1_1">Tab1.1 content</div>

<div id="tab1_2">Tab1.2 content</div>

</div>

</div>

<div id="tab2">Tab2 content</div>

</div>

<script type="text/javascript">

$('#mainTab').tabs();

$('#subTab1').tabs();

$('#mainTab').bind('tabsselect', function(event, ui) {

alert("Hello World main tab selecting " + ui.panel.id);

});

$('#subTab1').bind('tabsselect', function(event, ui) {

alert("Hello World sub tab selecting " + ui.panel.id);

});

</script>

Attachments (0)
Change History (3)

Changed June 15, 2010 01:14PM UTC by Greg comment:1

Hello,

I have a very nice piece of code which allows me to add two attributes to a tabs content div, myXmlUri and myXslURI, such that when clicked, the xml is retrieved, and the xsl transformation is performed to provide the content of the div. It works really nicely, apart from the issue reported above, which causes the content to appear twice! Any suggestions greatly appreciated, of if there is a more appropriate way to pursue this, I would appreciate any advice!

Greg

Changed June 15, 2010 01:21PM UTC by scottgonzalez comment:2

resolution: → invalid
status: newclosed

This is not a bug. Events bubble.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted