Skip to main content

Search and Top Navigation

#5750 closed bug (duplicate)

Opened June 22, 2010 09:36AM UTC

Closed October 22, 2010 11:44PM UTC

Last modified October 11, 2012 09:15PM UTC

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:
Description

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(),
Attachments (0)
Change History (2)

Changed October 22, 2010 11:44PM UTC by scottgonzalez comment:1

resolution: → duplicate
status: newclosed

Duplicate of #4524.

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

milestone: TBD

Milestone TBD deleted