mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1274533 - change legacy behaviour in observer rather than overwriting key status in data, r=jaws
MozReview-Commit-ID: UZWRYj2Mno --HG-- extra : rebase_source : d4042eea112cf2fd75995734305833acd3bdfbea extra : amend_source : 8825de2c1a8e5b88ddf7dd291687ee9e72a6c904
This commit is contained in:
parent
29525495be
commit
a2cc4253f0
@ -380,6 +380,11 @@ BrowserGlue.prototype = {
|
||||
if (win) {
|
||||
data = JSON.parse(data);
|
||||
let where = win.whereToOpenLink(data);
|
||||
// Preserve legacy behavior of non-modifier left-clicks
|
||||
// opening in a new selected tab.
|
||||
if (where == "current") {
|
||||
where = "tab";
|
||||
}
|
||||
win.openUILinkIn(data.href, where);
|
||||
linkHandled.data = true;
|
||||
}
|
||||
|
@ -357,17 +357,6 @@
|
||||
.createInstance(Components.interfaces.nsISupportsPRBool);
|
||||
linkHandled.data = false;
|
||||
let {shiftKey, ctrlKey, metaKey, altKey, button} = aEvent;
|
||||
if (!shiftKey && !altKey) {
|
||||
// Preserve legacy behavior of non-modifier left-clicks
|
||||
// opening in a new selected tab.
|
||||
let {AppConstants} =
|
||||
Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
|
||||
if (AppConstants.platform == "macosx") {
|
||||
metaKey = true;
|
||||
} else {
|
||||
ctrlKey = true;
|
||||
}
|
||||
}
|
||||
let data = {shiftKey, ctrlKey, metaKey, altKey, button, href};
|
||||
Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService)
|
||||
|
Loading…
Reference in New Issue
Block a user