Ticket #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: | |
| Blocking: | Blocked by: |
Description
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.uiTabs').tabs();
});
</script>
</head>
<body>
<div class="uiTabs">
<ul>
<li><a href="#tab1">Tab1</a></li>
<li><a name="tab2" href="#tab2">Tab2</a></li>
</ul>
<div id="tab2">Showing tab #2</div>
<div id="tab1">Showing tab #1</div>
</div>
</body>
</html>
When you navigate to http://<PATH>/page.html#tab2 the second tab will be selected but, the content in #tab1 is displayed.
Change History
comment:1 Changed 3 years ago by scott.gonzalez
- Status changed from new to closed
- Resolution set to fixed
- Milestone changed from TBD to 1.9
comment:3 Changed 2 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.


Fixed in c3145b6.