Bug 376519, Empty href js exception in this case when right-clicking, Patch by Florian Quèze, r=mano

This commit is contained in:
flamingice@sourmilk.net 2007-07-12 17:32:37 -07:00
Родитель 01c1c8fd0e
Коммит 9492b7b1e2
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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;