tabgroupsmenu icon indicating copy to clipboard operation
tabgroupsmenu copied to clipboard

Make menu work normal when replace panorama button

Open judison opened this issue 14 years ago • 2 comments
trafficstars

When you set extensions.tabgroupsmenu.replacePanoramaButton = true group menu itens stop working as usual (switch to group) and just pops up its submenu (tabs)

I made a small change, to keep the default behavior when you set replacePanoramaButton

in setupUiButton() bootstrop.js

I added this if (event.target == doc.getElementById("tabview-button"))

new version:

        if (getPref('replacePanoramaButton')) {
            tabviewButton.addEventListener("click", function(event) {
                if (event.target == doc.getElementById("tabview-button")) {
                    btnPopup.openPopup(tabviewButton, "after_start", 0, 0, false, false);
                    event.stopPropagation();
                    event.preventDefault();
                }
            }, true);
        }

very small change, sorry not to supply a .patch hope it will get into next release

Also, is there a way to remove the drop-down icon from the button when replacePanoramaButton=true ???? I tried, but don't know much about firefox plugin architeture...

judison avatar May 27 '11 23:05 judison

Thanks, I will include it when I release a new version.

char101 avatar May 29 '11 02:05 char101

To disable the drop down marker on the button just replace

tabviewButton.setAttribute("type", "menu-button");

with

if (! getPref('replacePanoramaButton')) {
  tabviewButton.setAttribute("type", "menu-button");
}

But I don't think I will add this behavior because it's obtrusive, better to create a new button that open the menu.

char101 avatar May 29 '11 02:05 char101