Bug 966741 - middle-clicking recently closed items in Australis menu panel should close the panel, r=jaws

This commit is contained in:
Gijs Kruitbosch 2014-02-25 13:20:28 +00:00
parent 335c48c715
commit 149170b5f6

View File

@ -191,6 +191,19 @@ const CustomizableWidgets = [{
}
recentlyClosedWindows.appendChild(windowsFragment);
},
onCreated: function(aNode) {
// Middle clicking recently closed items won't close the panel - cope:
let onRecentlyClosedClick = function(aEvent) {
if (aEvent.button == 1) {
CustomizableUI.hidePanelForNode(this);
}
};
let doc = aNode.ownerDocument;
let recentlyClosedTabs = doc.getElementById("PanelUI-recentlyClosedTabs");
let recentlyClosedWindows = doc.getElementById("PanelUI-recentlyClosedWindows");
recentlyClosedTabs.addEventListener("click", onRecentlyClosedClick);
recentlyClosedWindows.addEventListener("click", onRecentlyClosedClick);
},
onViewHiding: function(aEvent) {
LOG("History view is being hidden!");
}