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

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: Addressing the changes mention in comments in Patch set 2 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 63f70bb35fdb2b68ee17487558df5bca7785d9ea..ce88788fcae01a6d9d0dd6b1a312fac45ad6d562 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -339,7 +339,7 @@ bool HTMLInputElement::shouldShowFocusRingOnMouseFocus() const
void HTMLInputElement::updateFocusAppearance(bool restorePreviousSelection)
{
if (isTextField()) {
- if (!restorePreviousSelection || !hasCachedSelection())
+ if (!restorePreviousSelection)
select();
else
restoreCachedSelection();

Powered by Google App Engine
This is Rietveld 408576698