Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Firefox toolbar toggles bugged when toolbarbutton not in toolbar #2016

Closed

Description

@fuglede

When the toolbarbutton is in the hamburger menu rather than the toolbar, one can cause the counter toggle to behave badly. It's a bit finicky but this seems to be reproducable on the current master:

Steps to reproduce:

  • Move the toolbarbutton from the toolbar to the hamburger menu.
  • Disable "show counter"
  • Restart browser
  • Go to some page with active rulesets.

Expected result:

  • The label displaying the number of active rulesets is shown iff "show counter" is checked.

Actual result:

  • The label displaying the number of active rulesets is shown iff "show counter" is not checked.

Edit: The same issue occurs with the HTTP Nowhere option.

Edit 2: In fact, this might not even have anything to do with the hamburger menu; I seem to be able to reproduce the above even skipping the first step. It does not seem entirely consistent.

Activity

  1. changed the title [-]Firefox ruleset counter toggle bugged when toolbarbutton not in toolbar[/-] [+]Firefox toolbar toggles bugged when toolbarbutton not in toolbar[/+] on Jun 28, 2015
  2. fuglede commented on Jun 28, 2015

    @fuglede
    ContributorAuthor

    Yeah, okay, it seems like toolbar_button.js#L69 is never executed if the toolbarbutton is moved to the hamburger menu.

    The line should be executed when the first addEventListener("load", ...) fires, but apparently the toolbarbutton is not initialized until the hamburger menu is opened for the first time, so that needs to be caught somehow. I suppose one could always fix this by retrying every second or so, but that's nasty.

  3. fuglede commented on Jun 28, 2015

    @fuglede
    ContributorAuthor

    Okay, the following extension works (and appears to be as good as one can do without porting everything to the widget API):

    var showCounter = tb.shouldShowCounter();
    var counterItem = document.getElementById('https-everywhere-counter-item');
    if (counterItem) {
      counterItem.setAttribute('checked', showCounter);
    } else {
      let palette = document.getElementById("navigator-toolbox").palette;
      counterItem = palette.querySelector("#https-everywhere-counter-item");
      if (counterItem) {
        counterItem.setAttribute('checked', showCounter);
      }
    }
    

    I can include this with #2009 if you want? Fix included in #2009. Could probably use a bit of testing on various browsers.

  4. NewEraCracker commented on Jul 20, 2015

    @NewEraCracker

    I have an, I think, related bug.

    With HTTPS Everywhere 5.0.5 the button to open the activation/deactivation menu (the one that has a reset to default option too) worked. Starting from 5.0.6 that button does nothing, you click the menu and nothing happens.

    Using Firefox 38.1.0 ESR. At the moment I've downgraded to 5.0.5 which works and disabled automatic updates.

  5. NewEraCracker commented on Jul 20, 2015

    @NewEraCracker

    Also not working on Tor Browser 4.5.3 (Firefox 31.8.0 ESR). Had to revert to 5.0.5 there as well.

  6. jsha commented on Jul 20, 2015

    @jsha
    Member

    @NewEraCracker: That popup has been removed in the latest version, and its functionality moved into the icon menu. If you'd like to view the rulesets you've toggled state on, you can visit about:config?filter=https_everywhere.rule_toggle. To search for specific rulesets, you can visit https://www.eff.org/https-everywhere/atlas/.

  7. NewEraCracker commented on Jul 20, 2015

    @NewEraCracker
  8. jsha commented on Jul 20, 2015

    @jsha
    Member

    @NewEraCracker: Yes, that's working as intended. I have a pending pull request (#2231) to clarify in the new UI that that menuitem is descriptive rather than clickable.

  9. Hainish commented on Oct 5, 2017

    @Hainish
    Member

    Closing as issue that affected the legacy (deprecated) codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions