зеркало из https://github.com/mozilla/pjs.git
Bug 376519, Empty href js exception in this case when right-clicking, Patch by Florian Quèze, r=mano
This commit is contained in:
Родитель
01c1c8fd0e
Коммит
9492b7b1e2
|
@ -473,7 +473,7 @@ nsContextMenu.prototype = {
|
||||||
// Link?
|
// Link?
|
||||||
if (!this.onLink &&
|
if (!this.onLink &&
|
||||||
((elem instanceof HTMLAnchorElement && elem.href) ||
|
((elem instanceof HTMLAnchorElement && elem.href) ||
|
||||||
elem instanceof HTMLAreaElement ||
|
(elem instanceof HTMLAreaElement && elem.href) ||
|
||||||
elem instanceof HTMLLinkElement ||
|
elem instanceof HTMLLinkElement ||
|
||||||
elem.getAttributeNS("http://www.w3.org/1999/xlink", "type") == "simple")) {
|
elem.getAttributeNS("http://www.w3.org/1999/xlink", "type") == "simple")) {
|
||||||
|
|
||||||
|
@ -488,8 +488,8 @@ nsContextMenu.prototype = {
|
||||||
var parent = elem.parentNode;
|
var parent = elem.parentNode;
|
||||||
while (parent) {
|
while (parent) {
|
||||||
try {
|
try {
|
||||||
if ((parent instanceof HTMLAnchorElement && elem.href) ||
|
if ((parent instanceof HTMLAnchorElement && parent.href) ||
|
||||||
parent instanceof HTMLAreaElement ||
|
(parent instanceof HTMLAreaElement && parent.href) ||
|
||||||
parent instanceof HTMLLinkElement ||
|
parent instanceof HTMLLinkElement ||
|
||||||
parent.getAttributeNS("http://www.w3.org/1999/xlink", "type") == "simple")
|
parent.getAttributeNS("http://www.w3.org/1999/xlink", "type") == "simple")
|
||||||
realLink = parent;
|
realLink = parent;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче