Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#5750 closed bug (duplicate)

Bug with Tabs and sortable()

Reported by: voxen06 Owned by:
Priority: major Milestone:
Component: ui.tabs Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:


When using sortable() on tabs there is a bug when calling tabs.('remove', index) : a wrong tab is removed instead of the one at the given index.

To check this, merge the "Sortable" and "Simple manipulation" demos. Add some tabs then rearrange them a couple of times. Delete the second tab starting from left and it remains there while another tab gets deleted.

I've looked at the code in jquery.ui.tabs.js and the problem comes from the internal "lis" object which holds the list of each "<li>". This object is indexed in the order of created tabs and is not dynamically updated by sortable(). This list should be sorted with the current <li> order in the DOM before any indexed manipulation:

remove: function(index) {
  var o = this.options, $li = this.lis.eq(index).remove(),

Change History (2)

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

Resolution: duplicate
Status: newclosed

Duplicate of #4524.

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

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.