mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1377967 - make middle clicking history, bookmarks and closed tabs items work correctly, r=mikedeboer
MozReview-Commit-ID: VQUuQHyCXi --HG-- extra : rebase_source : 75e148a49ed86e1c979991daa43d31cfbf9511e0
This commit is contained in:
parent
12b877d713
commit
e105c93b98
@ -2020,7 +2020,7 @@ this.PlacesPanelview = class extends PlacesViewBase {
|
||||
get events() {
|
||||
if (this._events)
|
||||
return this._events;
|
||||
return this._events = ["command", "dragend", "dragstart", "ViewHiding", "ViewShown"];
|
||||
return this._events = ["click", "command", "dragend", "dragstart", "ViewHiding", "ViewShown"];
|
||||
}
|
||||
|
||||
get panel() {
|
||||
@ -2033,6 +2033,11 @@ this.PlacesPanelview = class extends PlacesViewBase {
|
||||
|
||||
handleEvent(event) {
|
||||
switch (event.type) {
|
||||
case "click":
|
||||
// For left and middle clicks, fall through to the command handler.
|
||||
if (event.button >= 2) {
|
||||
break;
|
||||
}
|
||||
case "command":
|
||||
this._onCommand(event);
|
||||
break;
|
||||
@ -2060,6 +2065,7 @@ this.PlacesPanelview = class extends PlacesViewBase {
|
||||
return;
|
||||
|
||||
PlacesUIUtils.openNodeWithEvent(button._placesNode, event);
|
||||
this.panelMultiView.closest("panel").hidePopup();
|
||||
}
|
||||
|
||||
_onDragEnd() {
|
||||
|
@ -110,6 +110,10 @@ this.RecentlyClosedTabsAndWindowsMenuUtils = {
|
||||
|
||||
aEvent.view.undoCloseTab(aEvent.originalTarget.getAttribute("value"));
|
||||
aEvent.view.gBrowser.moveTabToEnd();
|
||||
let ancestorPanel = aEvent.target.closest("panel");
|
||||
if (ancestorPanel) {
|
||||
ancestorPanel.hidePopup();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user