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

Unified Diff: Source/core/html/forms/CheckboxInputType.cpp

Issue 1188763002: Click event should be fired before change events for checkbox and radio button. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/forms/RadioInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/CheckboxInputType.cpp
diff --git a/Source/core/html/forms/CheckboxInputType.cpp b/Source/core/html/forms/CheckboxInputType.cpp
index db0555974f4fcfcc75adda79802acdc9e9a90e10..b6a4d57a2aef6acda04cac81be90aadcb364c730 100644
--- a/Source/core/html/forms/CheckboxInputType.cpp
+++ b/Source/core/html/forms/CheckboxInputType.cpp
@@ -91,6 +91,8 @@ void CheckboxInputType::didDispatchClick(Event* event, const ClickHandlingState&
if (event->defaultPrevented() || event->defaultHandled()) {
element().setIndeterminate(state.indeterminate);
element().setChecked(state.checked);
+ } else {
+ element().dispatchChangeEventIfNeeded();
}
// The work we did in willDispatchClick was default handling.
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/forms/RadioInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698