Opened 14 years ago

Closed 12 years ago

#4587 closed feature (wontfix)

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:


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:


This is how to fix the bug above:


$('#tabs ul li a').click(function () {location.hash = $(this).attr('href');});

That second line need only be rolled into the UI code itself.

Change History (3)

comment:1 Changed 14 years ago by Jörn Zaefferer

Milestone: TBD1.8

comment:2 Changed 14 years ago by klaus.hartl

Type: bugfeature

History support is planned at some later stage.

comment:3 Changed 12 years ago by Scott González

Resolution: wontfix
Status: newclosed

This should be done outside of the plugin to accommodate the application-specific hash tracking.

Note: See TracTickets for help on using tickets.