Index: Source/core/html/HTMLAnchorElement.cpp |
diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp |
index 533dc7f200053467398ad4fcd85b52a2a18c06ed..476c99df2663902cc3bf456bbf3c2ee055267acd 100644 |
--- a/Source/core/html/HTMLAnchorElement.cpp |
+++ b/Source/core/html/HTMLAnchorElement.cpp |
@@ -147,14 +147,15 @@ static void appendServerMapMousePosition(StringBuilder& url, Event* event) |
void HTMLAnchorElement::defaultEventHandler(Event* event) |
{ |
- if (isLink()) { |
- if (focused() && isEnterKeyKeydownEvent(event) && isLiveLink()) { |
+ if (isLiveLink()) { |
+ Node* target = event->target()->toNode(); |
+ if ((focused() || (target->focused() && contains(target))) && isEnterKeyKeydownEvent(event)) { |
pdr.
2014/10/01 20:32:37
This does not seem correct.
1) This will break ex
robwu
2014/10/01 21:25:54
Keyboard input events bubble, so I would expect th
|
event->setDefaultHandled(); |
dispatchSimulatedClick(event); |
return; |
} |
- if (isLinkClick(event) && isLiveLink()) { |
+ if (isLinkClick(event)) { |
handleClick(event); |
return; |
} |