Bug 1579643 - Prevent internal Add-On Manager links showing the "open link" dialog. r=mkmelin
authorGeoff Lankow <geoff@darktrojan.net>
Mon, 09 Sep 2019 21:26:08 +1200
changeset 36763 0a09a1ce4f8deca477c8ed8baa242b63682da056
parent 36762 96ab8f83895f7438d86ed4d007baf7041f4d6a41
child 36764 c5590ab6d0c60f4261c9f53df5de447441bc0daa
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewersmkmelin
bugs1579643
Bug 1579643 - Prevent internal Add-On Manager links showing the "open link" dialog. r=mkmelin
mail/base/content/specialTabs.js
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -1319,16 +1319,23 @@ var specialTabs = {
     let href = hRefForClickEvent(aEvent, true)[0];
 
     // We've explicitly allowed http, https and about as additional exposed
     // protocols in our default prefs, so these are the ones we need to check
     // for here.
     if (href) {
       let uri = makeURI(href);
       if (
+        aEvent.target.ownerDocument.location.href ==
+          "chrome://mozapps/content/extensions/aboutaddons.html" &&
+        uri.schemeIs("addons")
+      ) {
+        // Prevent internal AOM links showing the "open link" dialog.
+        aEvent.preventDefault();
+      } else if (
         !this._protocolSvc.isExposedProtocol(uri.scheme) ||
         ((uri.schemeIs("http") ||
           uri.schemeIs("https") ||
           uri.schemeIs("about")) &&
           !aSiteRegexp.test(uri.spec))
       ) {
         aEvent.preventDefault();
         openLinkExternally(href);