Bug 423432 parent.getAttributeNS is not a function [parent instanceof Document]
r=gavin a=beltzner git-svn-id: svn://10.0.0.236/trunk@249964 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
274059f98b
commit
3cb5e99149
@ -510,8 +510,9 @@ nsContextMenu.prototype = {
|
||||
// we're going to walk up the DOM looking for a parent link node,
|
||||
// this shouldn't be necessary, but we're matching the existing behaviour for left click
|
||||
var realLink = elem;
|
||||
var parent = elem.parentNode;
|
||||
while (parent) {
|
||||
var parent = elem;
|
||||
while ((parent = parent.parentNode) &&
|
||||
(parent.nodeType == Node.ELEMENT_NODE)) {
|
||||
try {
|
||||
if ((parent instanceof HTMLAnchorElement && parent.href) ||
|
||||
(parent instanceof HTMLAreaElement && parent.href) ||
|
||||
@ -519,7 +520,6 @@ nsContextMenu.prototype = {
|
||||
parent.getAttributeNS("http://www.w3.org/1999/xlink", "type") == "simple")
|
||||
realLink = parent;
|
||||
} catch (e) { }
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
|
||||
// Remember corresponding element.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user