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

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.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
Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index 7e77c07556be4a4f9c77343e8c8f2d71818d8586..d34e4b2b72cf6d832910b1a635f1c69c1fbf520d 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -991,11 +991,7 @@ void HTMLInputElement::setEditingValue(const String& value)
subtreeHasChanged();
unsigned max = value.length();
- if (focused())
- setSelectionRange(max, max, SelectionHasNoDirection, NotDispatchSelectEvent);
- else
- cacheSelectionInResponseToSetValue(max);
-
+ setSelectionRange(max, max, SelectionHasNoDirection, NotDispatchSelectEvent);
dispatchInputEvent();
}

Powered by Google App Engine
This is Rietveld 408576698