Bug 1417527 - Remove right click behavior as left click by checking the event.button. r=jaws
MozReview-Commit-ID: 1Fy2r5EXrU3
--- a/browser/components/preferences/in-content/containers.js
+++ b/browser/components/preferences/in-content/containers.js
@@ -12,18 +12,20 @@ const containersBundle = Services.string
const defaultContainerIcon = "fingerprint";
const defaultContainerColor = "blue";
let gContainersPane = {
init() {
this._list = document.getElementById("containersView");
- document.getElementById("backContainersLink").addEventListener("click", function() {
- gotoPref("general");
+ document.getElementById("backContainersLink").addEventListener("click", function(event) {
+ if (event.button == 0) {
+ gotoPref("general");
+ }
});
this._rebuildView();
},
_rebuildView() {
const containers = ContextualIdentityService.getPublicIdentities();
while (this._list.firstChild) {
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -109,27 +109,39 @@ var gPrivacyPane = {
setEventListener("browser.privatebrowsing.autostart", "change",
gPrivacyPane.updatePrivacyMicroControls);
setEventListener("historyMode", "command", function() {
gPrivacyPane.updateHistoryModePane();
gPrivacyPane.updateHistoryModePrefs();
gPrivacyPane.updatePrivacyMicroControls();
gPrivacyPane.updateAutostart();
});
- setEventListener("historyRememberClear", "click", function() {
- gPrivacyPane.clearPrivateDataNow(false);
- return false;
+ setEventListener("historyRememberClear", "click", function(event) {
+ if (event.button == 0) {
+ gPrivacyPane.clearPrivateDataNow(false);
+ return false;
+ }
+ });
+ setEventListener("historyRememberCookies", "click", function(event) {
+ if (event.button == 0) {
+ gPrivacyPane.showCookies();
+ return false;
+ }
});
- setEventListener("historyRememberCookies", "click", function() {
- gPrivacyPane.showCookies();
- return false;
+ setEventListener("historyDontRememberClear", "click", function(event) {
+ if (event.button == 0) {
+ gPrivacyPane.clearPrivateDataNow(true);
+ return false;
+ }
});
- setEventListener("historyDontRememberClear", "click", function() {
- gPrivacyPane.clearPrivateDataNow(true);
- return false;
+ setEventListener("openSearchEnginePreferences", "click", function(event) {
+ if (event.button == 0) {
+ gotoPref('search');
+ return false;
+ }
});
setEventListener("privateBrowsingAutoStart", "command",
gPrivacyPane.updateAutostart);
setEventListener("cookieExceptions", "command",
gPrivacyPane.showCookieExceptions);
setEventListener("showCookiesButton", "command",
gPrivacyPane.showCookies);
setEventListener("clearDataSettings", "command",
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -410,17 +410,17 @@
accesskey="&locbar.history2.accesskey;"
preference="browser.urlbar.suggest.history"/>
<checkbox id="bookmarkSuggestion" label="&locbar.bookmarks.label;"
accesskey="&locbar.bookmarks.accesskey;"
preference="browser.urlbar.suggest.bookmark"/>
<checkbox id="openpageSuggestion" label="&locbar.openpage.label;"
accesskey="&locbar.openpage.accesskey;"
preference="browser.urlbar.suggest.openpage"/>
- <label class="text-link" onclick="gotoPref('search')">
+ <label class="text-link" id="openSearchEnginePreferences">
&suggestionSettings2.label;
</label>
</groupbox>
<!-- Cache -->
<groupbox id="cacheGroup" data-category="panePrivacy" hidden="true">
<caption><label>&httpCache.label;</label></caption>