mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1896249 - Use BrowserUtils.getRootEvent everywhere r=Gijs,places-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D210121
This commit is contained in:
parent
fe8d73eb88
commit
76da252271
@ -115,12 +115,13 @@ var StarUI = {
|
||||
this.panel.hidePopup();
|
||||
break;
|
||||
// This case is for catching character-generating keypresses
|
||||
case 0:
|
||||
case 0: {
|
||||
let accessKey = document.getElementById("key_close");
|
||||
if (eventMatchesKey(aEvent, accessKey)) {
|
||||
this.panel.hidePopup();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "compositionend":
|
||||
@ -704,7 +705,7 @@ class HistoryMenu extends PlacesMenu {
|
||||
}
|
||||
|
||||
_onCommand(aEvent) {
|
||||
aEvent = getRootEvent(aEvent);
|
||||
aEvent = BrowserUtils.getRootEvent(aEvent);
|
||||
let placesNode = aEvent.target._placesNode;
|
||||
if (placesNode) {
|
||||
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
|
||||
|
@ -2525,7 +2525,7 @@ const BrowserSearch = {
|
||||
csp,
|
||||
event
|
||||
) {
|
||||
event = getRootEvent(event);
|
||||
event = BrowserUtils.getRootEvent(event);
|
||||
let where = BrowserUtils.whereToOpenLink(event);
|
||||
if (where == "current") {
|
||||
// override: historically search opens in new tab
|
||||
|
@ -108,11 +108,6 @@ function openUILink(
|
||||
);
|
||||
}
|
||||
|
||||
// This is here for historical reasons. bug 1742889 covers cleaning this up.
|
||||
function getRootEvent(aEvent) {
|
||||
return BrowserUtils.getRootEvent(aEvent);
|
||||
}
|
||||
|
||||
function openTrustedLinkIn(url, where, params) {
|
||||
URILoadingHelper.openTrustedLinkIn(window, url, where, params);
|
||||
}
|
||||
|
@ -2096,7 +2096,7 @@ this.PlacesPanelview = class PlacesPanelview extends PlacesViewBase {
|
||||
}
|
||||
|
||||
_onCommand(event) {
|
||||
event = getRootEvent(event);
|
||||
event = BrowserUtils.getRootEvent(event);
|
||||
let button = event.originalTarget;
|
||||
if (!button._placesNode) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user