Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#6125 closed bug (fixed)

Incorrect selection of tab on init with hash in url and misordered divs

Reported by: jenters Owned by:
Priority: minor Milestone: 1.8.6
Component: ui.tabs Version: 1.8.5
Keywords: hash Cc:
Blocked by: Blocking:


When the URL has a hash and the tabs are not ordered in the same way as the divs containing the tab content, the correct content is not displayed.

Given the following page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Tab Test</title>
	<link href="jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css" />

	<script type="text/javascript" src="jquery-1.4.2.js"></script>
	<script type="text/javascript" src="jquery.ui.core.js"></script>
	<script type="text/javascript" src="jquery.ui.widget.js"></script>
	<script type="text/javascript" src="jquery.ui.tabs.js"></script>
	<script type="text/javascript">
		$(document).ready(function () {

<div class="uiTabs">
		<li><a href="#tab1">Tab1</a></li>
		<li><a name="tab2" href="#tab2">Tab2</a></li>
	<div id="tab2">Showing tab #2</div>
	<div id="tab1">Showing tab #1</div>


When you navigate to http://<PATH>/page.html#tab2 the second tab will be selected but, the content in #tab1 is displayed.

Change History (3)

comment:1 Changed 10 years ago by Scott González

Milestone: TBD1.9
Resolution: fixed
Status: newclosed

Fixed in c3145b6.

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


comment:3 Changed 9 years ago by jenters

Tab: modified init to display correct content of misordered div when hash present in url. Fixed #6125 - Incorrect selection of tab on init with hash in url and misordered divs

Changeset: c3145b691b0d028f94fc43c035047d532de94112

Note: See TracTickets for help on using tickets.