Skip to main content

Search and Top Navigation

#6168 closed bug (worksforme)

Opened October 11, 2010 12:47PM UTC

Closed October 28, 2010 03:22PM UTC

Last modified October 11, 2012 09:15PM UTC

Tabs misordering bug with unusual markup

Reported by: betalb Owned by:
Priority: minor Milestone:
Component: ui.tabs Version: 1.8.5
Keywords: Cc:
Blocked by: Blocking:
Description

I have following markup for tabs

<div id="tabs">
  <ul>
    <li><a href="#tab-1">1</a></li>
  </ul>
  <div>
    <div id="tab-1"></div>
  </div>
</div>

NOTE tab panels wrapped into div

Then I call

$('#tabs')
  .tabs()
  .bind('tabsadd', function (event, ui) {
    // FIXME: ui.panel.id === 'tab-1'
  })
  .tabs('add', '#fake', 'new tab');

_tabify uses add method of jQuery to collect tab panels, but add method reorders elements according to dom order (starting from 1.4), so the last panel will be #tab-1, not #fake, because it have been inserted just after <ul>

This bug has a relation to #4233 and #5813

Attachments (0)
Change History (2)

Changed October 28, 2010 03:22PM UTC by scottgonzalez comment:1

resolution: → worksforme
status: newclosed

I can't reproduce this in any version. Alerting ui.panel.id always says "fake" and clicking on the tabs works properly.

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

milestone: TBD

Milestone TBD deleted