Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1193)

Unified Diff: Source/core/html/forms/TextFieldInputType.cpp

Issue 258063005: Blink does not respect input.selectionStart and input.selectionEnd for some cases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing changes asked in patch set 5 Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/forms/TextFieldInputType.cpp
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp
index 1bc9e7bab0445c155d7c11c733a9bb0caf643f76..a81e325deb03ccf18c0129563babc8bf3aea6d06 100644
--- a/Source/core/html/forms/TextFieldInputType.cpp
+++ b/Source/core/html/forms/TextFieldInputType.cpp
@@ -163,7 +163,7 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange
if (input->focused())
input->setSelectionRange(max, max);
else
- input->cacheSelectionInResponseToSetValue(max);
+ input->setSelectionRange(input->selectionStartForJavascriptBindings(), input->selectionEndForJavascriptBindings());
if (!valueChanged)
return;

Powered by Google App Engine
This is Rietveld 408576698