Changing the URL anchor when switching tabs.
Reported by Chaz Meyers | September 25th, 2009 @ 02:21 PM | in 1.0
I noticed that when using Control.Tabs, when you go from one tab to another it doesn't change the anchor in the URL. This breaks the back/forward buttons and means that you don't store which tab you're at when you bookmark.
I wasn't sure if this was a deliberate design decision, but since I was making the change in my own copy anyway I figured it would be nice to contribute a patch.
Comments and changes to this ticket
-
Chaz Meyers September 25th, 2009 @ 02:23 PM
I'm not sure why, but it wouldn't let me add the ticket with the patch. Just in case it doesn't work again, here's a copy/paste of it:
diff --git a/src/tabs.js b/src/tabs.js
index 7efbe24..133c1b8 100644
--- a/src/tabs.js +++ b/src/tabs.js @@ -83,10 +83,8 @@ Control.Tabs = Class.create({throw "Control.Tabs: #" + link.key + " was not found on the page."; } this.containers.set(link.key,container); link[this.options.hover ? 'onmouseover' : 'onclick'] = function(link){
-
if(window.event) {
-
Event.stop(window.event); } this.setActiveTab(link);
-
return false;
-
return true; }.bind(this,link);
-
-
Chaz Meyers September 25th, 2009 @ 02:26 PM
OK. That was awful too. Sorry for all the noise.
Here's a link to it: http://www.chazmeyers.com/code/tabs.js.diff
-
Nathan L Smith October 23rd, 2009 @ 09:57 AM
- State changed from new to invalid
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
NOTE: Please do not open tickets here. If you have an issue, please open it on http://github.com/syntacticx/livepipe-ui/issues/
High quality widgets and controls for web 2.0 applications built using the Prototype JavaScript Framework. Each control is well tested, highly extensible, fully documented and degrades gracefully for non JavaScript enabled browsers where possible. MIT licensed and actively maintained.