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

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

Issue 1894383002: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Created 4 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: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 1457a420da193789ed7d88d390a757d665382ef8..1a1da81c2362b179f69af035c17f5428cb729e54 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -293,6 +293,9 @@ Textfield::Textfield()
set_drag_controller(this);
GetRenderText()->SetFontList(GetDefaultFontList());
SetBorder(std::unique_ptr<Border>(new FocusableBorder()));
+
+ // On Mac, only textfields and list controls are focusable by default. Hence
+ // use ALWAYS focus behavior.
SetFocusBehavior(FocusBehavior::ALWAYS);
if (ViewsDelegate::GetInstance()) {

Powered by Google App Engine
This is Rietveld 408576698