Search and Top Navigation
#4587 closed feature (wontfix)
Opened June 09, 2009 04:05AM UTC
Closed October 22, 2010 08:25PM UTC
jQuery Tabs Do Not Update Browser's Location Bar
Reported by: | zachstronaut | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.tabs | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
As you switch tabs when using the jQuery UI Tabs widget, the browser location bar stays on the same URI as when you hit the page. If you land on the page with the URI #tab2, and you are now viewing the 4th tab, the URI in the location bar will still say #tab2. This means that if you bookmark the page with default browser behavior, you will bookmark the wrong tab. It also makes it easy to copy and paste the wrong URI to somebody.
The fix is easy. If this is the default way to invoke the Tabs UI:
$('#tabs').tabs();
This is how to fix the bug above:
$('#tabs').tabs();
$('#tabs ul li a').click(function () {location.hash = $(this).attr('href');});
That second line need only be rolled into the UI code itself.
Attachments (0)
Change History (3)
Changed June 09, 2009 08:12AM UTC by comment:1
milestone: | TBD → 1.8 |
---|
Changed June 12, 2009 05:45AM UTC by comment:2
type: | bug → feature |
---|
History support is planned at some later stage.
Changed October 22, 2010 08:25PM UTC by comment:3
resolution: | → wontfix |
---|---|
status: | new → closed |
This should be done outside of the plugin to accommodate the application-specific hash tracking.