Index: Source/core/html/forms/TextFieldInputType.cpp |
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp |
index 1b78abe81c6802df9dd34458a9f75859217cdbb0..b83ced0e037f274fb4a10e88b4aa1b53455545c7 100644 |
--- a/Source/core/html/forms/TextFieldInputType.cpp |
+++ b/Source/core/html/forms/TextFieldInputType.cpp |
@@ -157,11 +157,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; |