Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#6168 closed bug (worksforme)

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

Change History (2)

comment:1 Changed 8 years ago by Scott González

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.

comment:2 Changed 6 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.