Index: Source/core/html/forms/TextFieldInputType.cpp |
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp |
index 041d0307d823880aa98a8326103e359f9742e37a..6df7ed5462bbd1e17ce3caf529be6401946ebf15 100644 |
--- a/Source/core/html/forms/TextFieldInputType.cpp |
+++ b/Source/core/html/forms/TextFieldInputType.cpp |
@@ -212,6 +212,8 @@ void TextFieldInputType::handleKeydownEventForSpinButton(KeyboardEvent* event) |
spinButtonStepDown(); |
else |
return; |
+ if (element().focused()) |
tkent
2014/03/18 08:26:20
Why is the focus check needed? It looks unnecessar
|
+ element().dispatchFormControlChangeEvent(); |
event->setDefaultHandled(); |
} |
@@ -558,4 +560,12 @@ bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() |
return shouldSpinButtonRespondToMouseEvents() && element().focused(); |
} |
+void TextFieldInputType::spinButtonDidReleaseMouseCapture() |
+{ |
+ // Sending dispatch change event only when in focus, |
+ // as when out of focus change event is triggered from setValue::DispatchChangeEvent. |
+ if (element().focused()) |
tkent
2014/03/18 08:26:20
Ditto.
|
+ element().dispatchFormControlChangeEvent(); |
+} |
+ |
} // namespace WebCore |