Search and Top Navigation
#4525 closed bug (fixed)
Opened May 08, 2009 07:01PM UTC
Closed May 17, 2011 02:14PM UTC
Remove Tab problem with hide() Effect on Selected Tab
Reported by: | reedmaniac | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.5 |
Component: | ui.tabs | Version: | 1.7.1 |
Keywords: | tabs remove hide effect | Cc: | |
Blocked by: | Blocking: |
Description
A bit of a tricky one to pin down. Prior to the tab being deleted, I wanted the tab container to be hidden first using a regular hide() Effect. Then, I was going to do the .tabs('remove') in the callback.
Simple enough. However, I also wanted an 'add tab" list item that would be float:right in the same ul as the Tab'ed items. This additional, non-Tab'ed item seems to be what causes a problem.
Included is a file to duplicate. Steps:
1. Drop this file into the ./demos/tabs/ directory so it loads files/theme correctly.
2. Click the image in the upper right of the "Nunc tincidunt" tab.
Result: "Nunc tincidunt" AND "Proin dolor" tabs disappear.
I tracked this down a bit. It seems that when the remove() method tries to select another tab that the select() method's last line causes the next tab to be deleted too:
this.anchors.eq(index).trigger(this.options.event + '.tabs');