From 9492b7b1e22ddfedac5b9b4e0901a18963eac444 Mon Sep 17 00:00:00 2001 From: "flamingice@sourmilk.net" Date: Thu, 12 Jul 2007 17:32:37 -0700 Subject: [PATCH] =?UTF-8?q?Bug=20376519,=20Empty=20href=20js=20exception?= =?UTF-8?q?=20in=20this=20case=20when=20right-clicking,=20Patch=20by=20Flo?= =?UTF-8?q?rian=20Qu=C3=A8ze,=20r=3Dmano?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browser/base/content/nsContextMenu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index 20b32465754..e70fb5671c8 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -473,7 +473,7 @@ nsContextMenu.prototype = { // Link? if (!this.onLink && ((elem instanceof HTMLAnchorElement && elem.href) || - elem instanceof HTMLAreaElement || + (elem instanceof HTMLAreaElement && elem.href) || elem instanceof HTMLLinkElement || elem.getAttributeNS("http://www.w3.org/1999/xlink", "type") == "simple")) { @@ -488,8 +488,8 @@ nsContextMenu.prototype = { var parent = elem.parentNode; while (parent) { try { - if ((parent instanceof HTMLAnchorElement && elem.href) || - parent instanceof HTMLAreaElement || + if ((parent instanceof HTMLAnchorElement && parent.href) || + (parent instanceof HTMLAreaElement && parent.href) || parent instanceof HTMLLinkElement || parent.getAttributeNS("http://www.w3.org/1999/xlink", "type") == "simple") realLink = parent;