Index: Source/core/html/forms/TextFieldInputType.cpp |
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp |
index 5d8e19ce911ba504ddecf3292b7bca5ab25f895e..f12da108203d112ded83353649e5e5d8431db3cb 100644 |
--- a/Source/core/html/forms/TextFieldInputType.cpp |
+++ b/Source/core/html/forms/TextFieldInputType.cpp |
@@ -159,11 +159,11 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange |
if (valueChanged) |
input->updateView(); |
- unsigned max = visibleValue().length(); |
+ int max = visibleValue().length(); |
if (input->focused()) |
input->setSelectionRange(max, max); |
else |
- input->cacheSelectionInResponseToSetValue(max); |
+ input->setSelectionRange(input->selectionStartForJavascriptBindings(), input->selectionEndForJavascriptBindings()); |
if (!valueChanged) |
return; |