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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 103293004: No touch handles when Views textfield cannot get focused (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated after r288781 Created 6 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 | « no previous file | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index e05f969de2962679be6f5880e512c7cd7a1970bb..77cbdfae58dd6fe007f1234976a658dd5d953c94 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1753,6 +1753,9 @@ void Textfield::RevealPasswordChar(int index) {
}
void Textfield::CreateTouchSelectionControllerAndNotifyIt() {
+ if (!HasFocus())
+ return;
+
if (!touch_selection_controller_) {
touch_selection_controller_.reset(
ui::TouchSelectionController::create(this));
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698