#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: |
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(),
Duplicate of #4524.