Bug 1402849 - Close library panel on mid mouse click r?mikedeboer
MozReview-Commit-ID: 8AM0efs7krS
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -575,16 +575,20 @@ const PanelUI = {
*
* @param {MouseEvent} event Click event, originating from the Highlight.
*/
onLibraryHighlightClick(event) {
let button = event.target;
if (event.button > 1 || !button._highlight) {
return;
}
+ if (event.button == 1) {
+ // Bug 1402849, close library panel on mid mouse click
+ CustomizableUI.hidePanelForNode(button);
+ }
window.openUILink(button._highlight.url, event);
},
/**
* NB: The enable- and disableSingleSubviewPanelAnimations methods only
* affect the hiding/showing animations of single-subview panels (tempPanel
* in the showSubView method).
*/