tabgroupsmenu
tabgroupsmenu copied to clipboard
Make menu work normal when replace panorama button
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...
Thanks, I will include it when I release a new version.
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.