Skip to main content

Search and Top Navigation

#3663 closed bug (notabug)

Opened December 12, 2008 04:24PM UTC

Closed December 14, 2008 12:47PM UTC

Last modified October 11, 2012 09:15PM UTC

UI-Tabs: selected option bug with core 1.2.6

Reported by: adammarth Owned by:
Priority: minor Milestone:
Component: ui.tabs Version: 1.5.1
Keywords: jQuery 1.2.6 core tabs default selected Cc:
Blocked by: Blocking:
Description

Using UI 1.5.1 with jQuery 1.2.3. Tabs plugin is being used with ajax loaded content. Using tabs method which takes options to create tabs object. Options include 'selected' parm to select the second tab (out of 2 total). This works as desired.

Introduced jQuery core 1.2.6r5685. The 'selected' parm no longer appears to work. The page loads, but no content is displayed. If I view the generated source of the page using FireFox and the Web Developer plugin, I can see that the ajax content is loaded correctly, but the "ui-tabs-panel" (which is being targeted via the tab with an id of "tabContent") contains the class "ui-tabs-hide" causing the content to be hidden. If I then click on the first tab, the content is loaded for that tab and displayed to the user; however, the second tab is not active and cannot be clicked.

If I pass a 0 as the default selected, or remove the parm from the options passed, the 0 tab displays correctly and I am able to click on the second tab and its content displays correctly.

I have found a workaround that works.

Broken:

$(document).ready(function(){
  $("#tabs").tabs({remote: true, selected: 1});
});

Workaround:

$(document).ready(function(){
  var tabs=$("#tabs").tabs({remote: true, selected: null});
  tabs.tabs('select',1);
});

Example page is attached and is meant only to convey our usage. This is not known to be a working example.

Attachments (1)
  • UI-BugTrackerExample.txt (1.1 KB) - added by adammarth December 12, 2008 04:24PM UTC.

    Example file to show our usage of tabs

Change History (2)

Changed December 14, 2008 12:47PM UTC by klaus.hartl comment:1

resolution: → invalid
status: newclosed

Incoorect usage. Each tab must have its own panel.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:2

milestone: TBD

Milestone TBD deleted