Opened 10 years ago

Closed 8 years ago

#4525 closed bug (fixed)

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.
  1. 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');

Attachments (1)

sortable_test.html (4.5 KB) - added by reedmaniac 10 years ago.
Delete of Currently Selected Tab Deletes Two Tabs

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by reedmaniac

Attachment: sortable_test.html added

Delete of Currently Selected Tab Deletes Two Tabs

comment:1 Changed 10 years ago by Jörn Zaefferer

Milestone: TBD1.8

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

Milestone: 1.91.8.5
Resolution: fixed
Status: newclosed

This was fixed in 1.8.5.

Note: See TracTickets for help on using tickets.