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

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

Issue 1894383002: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SetFocusBehavior
Patch Set: Rebased Created 4 years, 7 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/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index e08f914a29a81530501d1482745ce572447d16ee..278b4c3bada9a75727e048a8048ef91c1d21e97d 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -354,7 +354,12 @@ Combobox::Combobox(ui::ComboboxModel* model)
arrow_button_(new TransparentButton(this)),
weak_ptr_factory_(this) {
ModelChanged();
+#if defined(OS_MACOSX)
+ SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
+#else
SetFocusBehavior(FocusBehavior::ALWAYS);
+#endif
+
UpdateBorder();
// set_background() takes ownership but takes a raw pointer.
std::unique_ptr<Background> b = PlatformStyle::CreateComboboxBackground();

Powered by Google App Engine
This is Rietveld 408576698