Index: Source/core/html/forms/TextFieldInputType.cpp |
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp |
index b7dc5cd7e552b05095da7e1d128631cfdd62a193..343720f9cad58ee8ab0821ea0f9b7019e217cb8b 100644 |
--- a/Source/core/html/forms/TextFieldInputType.cpp |
+++ b/Source/core/html/forms/TextFieldInputType.cpp |
@@ -186,7 +186,7 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange |
break; |
} |
- if (!input->focused()) |
+ if (eventBehavior == DispatchNoEvent) |
input->setTextAsOfLastFormControlChangeEvent(sanitizedValue); |
} |
@@ -212,7 +212,6 @@ void TextFieldInputType::handleKeydownEventForSpinButton(KeyboardEvent* event) |
spinButtonStepDown(); |
else |
return; |
- element().dispatchFormControlChangeEvent(); |
event->setDefaultHandled(); |
} |