Bug 1569703 - Port Bug 376519 "Empty href js exception in this case when right-clicking" to SeaMonkey. r=frg a=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Wed, 31 Jul 2019 21:56:04 +0200
changeset 32250 ee8368427e04c85bf16be5322f779daa2965d7b6
parent 32249 7c134fa3cd9fa430ce46202db2dee45b889323ef
child 32251 c7fc5af1cb292af8be2ed5ccabf4a05eddcf96e9
push id208
push userfrgrahl@gmx.net
push dateWed, 31 Jul 2019 19:58:37 +0000
treeherdercomm-esr60@2375c07411d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg, frg
bugs1569703, 376519
Bug 1569703 - Port Bug 376519 "Empty href js exception in this case when right-clicking" to SeaMonkey. r=frg a=frg
suite/base/content/nsContextMenu.js
--- a/suite/base/content/nsContextMenu.js
+++ b/suite/base/content/nsContextMenu.js
@@ -716,17 +716,17 @@ nsContextMenu.prototype = {
     // Bubble out, looking for items of interest
     const XMLNS = "http://www.w3.org/XML/1998/namespace";
     var elem = this.target;
     while (elem) {
       if (elem.nodeType == Node.ELEMENT_NODE) {
         // Link?
         if (!this.onLink &&
             ((elem instanceof HTMLAnchorElement && elem.href) ||
-             elem instanceof HTMLAreaElement ||
+             (elem instanceof HTMLAreaElement && elem.href) ||
              elem instanceof HTMLLinkElement ||
              (elem.namespaceURI == NS_MathML && elem.hasAttribute("href")) ||
              elem.getAttributeNS("http://www.w3.org/1999/xlink", "type") == "simple")) {
           // Clicked on a link.
           this.onLink = true;
           this.onMetaDataItem = true;
           // Remember corresponding element.
           this.link = elem;