mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Ignore anchors without href attrs in contentAreaClick. Bug 120973,
r=caillon, sr=blake
This commit is contained in:
parent
ee080fcf2f
commit
e3f71a6d6d
@ -127,14 +127,9 @@
|
||||
|
||||
switch (local_name) {
|
||||
case "a":
|
||||
linkNode = target;
|
||||
break;
|
||||
case "area":
|
||||
if (target.href)
|
||||
linkNode = target;
|
||||
break;
|
||||
case "link":
|
||||
if (target.href)
|
||||
if (target.hasAttribute("href"))
|
||||
linkNode = target;
|
||||
break;
|
||||
case "input":
|
||||
@ -147,6 +142,10 @@
|
||||
break;
|
||||
default:
|
||||
linkNode = findParentNode(event.originalTarget, "a");
|
||||
// <a> cannot be nested. So if we find an anchor without an
|
||||
// href, there is no useful <a> around the target
|
||||
if (linkNode && !linkNode.hasAttribute("href"))
|
||||
linkNode = null;
|
||||
break;
|
||||
}
|
||||
if (linkNode) {
|
||||
|
Loading…
Reference in New Issue
Block a user