Skip to main content

Search and Top Navigation

#3490 closed bug (fixed)

Opened October 21, 2008 04:31PM UTC

Closed December 08, 2008 04:58PM UTC

After removal $tabs.data('selected.tabs') contains wrong information

Reported by: c_schmitz Owned by: klaus.hartl
Priority: major Milestone: 1.7
Component: ui.tabs Version: 1.5.2
Keywords: tabs removal tabindex Cc:
Blocked by: Blocking:
Description

I have a tabs with 5 pages. Simpe test case:

$tabs = $("#tabPageSections > ul").tabs({
        cache: true,
        ajaxOptions:{
            dataType:"html",
            success: attachevents
        }
    });

Code snippet for delete
{
   var selected = $tabs.data('selected.tabs');
   alert (selected);
   $("#tabPageSections > ul").tabs("remove",selected);
}

After every delete the visually selected tab is 0, but the alert always returns(1). Delete is started by a mouse click on a link with onclick event. The first deletion works as expected but on second deletion not at selected tab is deleted but the tab after the visually selected one.

This is very problematic if the user deletes several tabs without changing the tab becaus the wrong tab gets deleted.

If i change the tabe back and forth before the next delete the alerted index is fine.

Attachments (0)
Change History (2)

Changed October 30, 2008 09:07PM UTC by klaus.hartl comment:1

milestone: TBD1.6

Changed December 08, 2008 04:58PM UTC by klaus.hartl comment:2

resolution: → fixed
status: newclosed

Fixed that the other day.