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

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 222023002: focus() behaviour differs depending on how value is set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebasing Created 6 years, 8 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/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 37d8a7a09afeedaeb303b5a3907ad09ac5b27298..7952c58f83be743b8803e9610ed433ab59f45558 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -337,7 +337,7 @@ bool HTMLInputElement::shouldShowFocusRingOnMouseFocus() const
void HTMLInputElement::updateFocusAppearance(bool restorePreviousSelection)
{
if (isTextField()) {
- if (!restorePreviousSelection || !hasCachedSelection())
+ if (!restorePreviousSelection)
select();
else
restoreCachedSelection();
« no previous file with comments | « LayoutTests/fast/forms/input-double-click-selection-gap-bug.html ('k') | Source/core/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698