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

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

Issue 2277903003: Fix selectionDirection after setting value of TEXTAREA/INPUT. (Closed)
Patch Set: Revert DCHECK_LE Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
index f3c8f55b5a766928778e7fe5222a7b51fc07b79f..f762c0f5907b5964358e0aced3fa506c0e7d639c 100644
--- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
@@ -163,10 +163,7 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange
element().updateView();
unsigned max = visibleValue().length();
- if (element().focused())
- element().setSelectionRange(max, max, SelectionHasNoDirection, NotDispatchSelectEvent);
- else
- element().cacheSelectionInResponseToSetValue(max);
+ element().setSelectionRange(max, max, SelectionHasNoDirection, NotDispatchSelectEvent);
if (!valueChanged)
return;
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698