Index: Source/core/html/forms/TextFieldInputType.cpp |
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp |
index 135d7f9c7ca7f25b883b3fc76c6d8bc134747121..d536c93e21492a989ae169a05be0689abebf3085 100644 |
--- a/Source/core/html/forms/TextFieldInputType.cpp |
+++ b/Source/core/html/forms/TextFieldInputType.cpp |
@@ -189,7 +189,7 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange |
} |
if (!input->focused()) |
- input->setTextAsOfLastFormControlChangeEvent(sanitizedValue); |
+ input->setTextAsOfLastFormControlChangeEvent(sanitizedValue.isNull() ? input->defaultValue() : sanitizedValue); |
} |
void TextFieldInputType::handleKeydownEvent(KeyboardEvent* event) |