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

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

Issue 23851005: Change event isn't firing when the user reverts the value of a color/date/time input after JS cha… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updated test expectation Created 7 years, 3 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
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 7c90e1caaaca2340f94aab8b3d8cc597dc59f292..c8a303e6cb47fff042d5490533303a9d81155b92 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -1028,8 +1028,12 @@ void HTMLInputElement::setValue(const String& value, TextFieldEventBehavior even
setLastChangeWasNotUserEdit();
setFormControlValueMatchesRenderer(false);
m_suggestedValue = String(); // Prevent TextFieldInputType::setValue from using the suggested value.
+
m_inputType->setValue(sanitizedValue, valueChanged, eventBehavior);
+ if (valueChanged && eventBehavior == DispatchNoEvent)
+ setTextAsOfLastFormControlChangeEvent(sanitizedValue);
+
if (!valueChanged)
return;

Powered by Google App Engine
This is Rietveld 408576698