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

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

Issue 21005002: Order of actions for labeled control should be focus then click. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/label/label-event-order-expected.txt ('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 9f3d061a1e7c74a9e6fffe74b5c5216590f2e2fa..91a159137222ba5e0f0db1348a81596fe6479cb8 100644
--- a/Source/core/html/HTMLLabelElement.cpp
+++ b/Source/core/html/HTMLLabelElement.cpp
@@ -131,13 +131,13 @@ void HTMLLabelElement::defaultEventHandler(Event* evt)
processingClick = true;
- // Click the corresponding control.
- element->dispatchSimulatedClick(evt);
-
document()->updateLayoutIgnorePendingStylesheets();
if (element->isMouseFocusable())
element->focus();
+ // Click the corresponding control.
+ element->dispatchSimulatedClick(evt);
+
processingClick = false;
evt->setDefaultHandled();
« no previous file with comments | « LayoutTests/fast/forms/label/label-event-order-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698