Index: Source/core/html/shadow/DateTimeNumericFieldElement.cpp |
diff --git a/Source/core/html/shadow/DateTimeNumericFieldElement.cpp b/Source/core/html/shadow/DateTimeNumericFieldElement.cpp |
index 569d72e7961002ab94ad648b6d7abe43f716b35a..4825d7b52f28c46e7c0163771ea200385730c96a 100644 |
--- a/Source/core/html/shadow/DateTimeNumericFieldElement.cpp |
+++ b/Source/core/html/shadow/DateTimeNumericFieldElement.cpp |
@@ -91,13 +91,15 @@ int DateTimeNumericFieldElement::defaultValueForStepUp() const |
return m_range.minimum; |
} |
-void DateTimeNumericFieldElement::didBlur() |
+void DateTimeNumericFieldElement::setFocus(bool value) |
{ |
- int value = typeAheadValue(); |
- m_typeAheadBuffer.clear(); |
- if (value >= 0) |
- setValueAsInteger(value, DispatchEvent); |
- DateTimeFieldElement::didBlur(); |
+ if (!value) { |
+ int value = typeAheadValue(); |
+ m_typeAheadBuffer.clear(); |
+ if (value >= 0) |
+ setValueAsInteger(value, DispatchEvent); |
+ } |
+ DateTimeFieldElement::setFocus(value); |
} |
String DateTimeNumericFieldElement::formatValue(int value) const |