Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Changing the URL anchor when switching tabs.

#69

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.

Reported by Chaz Meyers · September 25th, 2009 @ 02:21 PM

State: invalid
Milestone: 1.0
Assigned to: Ryan Johnson Ryan Johnson

Activity

  1. Chaz Meyers
    Chaz Meyers

    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);
      
      }, setActiveTab: function(link){

    September 25th, 2009 @ 02:23 PM

  2. Chaz Meyers
    Chaz Meyers

    OK. That was awful too. Sorry for all the noise.

    Here's a link to it: http://www.chazmeyers.com/code/tabs.js.diff

    September 25th, 2009 @ 02:26 PM

  3. Nathan L Smith

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.