Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1089)

Unified Diff: Source/core/html/HTMLLabelElement.cpp

Issue 21321002: Form control focus by click on a label should be handled as same as focus (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/button/button-focus-by-label-click-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLLabelElement.cpp
diff --git a/Source/core/html/HTMLLabelElement.cpp b/Source/core/html/HTMLLabelElement.cpp
index 91a159137222ba5e0f0db1348a81596fe6479cb8..20e18c8237c91d3ed114bbb639edc6eb0edc0a3b 100644
--- a/Source/core/html/HTMLLabelElement.cpp
+++ b/Source/core/html/HTMLLabelElement.cpp
@@ -133,7 +133,7 @@ void HTMLLabelElement::defaultEventHandler(Event* evt)
document()->updateLayoutIgnorePendingStylesheets();
if (element->isMouseFocusable())
- element->focus();
+ element->focus(true, FocusDirectionMouse);
// Click the corresponding control.
element->dispatchSimulatedClick(evt);
« no previous file with comments | « LayoutTests/fast/forms/button/button-focus-by-label-click-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698