Ticket #3490 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

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:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 5 years ago by klaus.hartl

  • Milestone changed from TBD to 1.6

comment:2 Changed 5 years ago by klaus.hartl

  • Status changed from new to closed
  • Resolution set to fixed

Fixed that the other day.

Note: See TracTickets for help on using tickets.