Index: ui/views/controls/combobox/combobox.cc |
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc |
index af0caa6be92b60086508c9893db05a0bed266e65..bc10dbd5e6037b65d3cf6ea8d8cc2c921851ee4a 100644 |
--- a/ui/views/controls/combobox/combobox.cc |
+++ b/ui/views/controls/combobox/combobox.cc |
@@ -94,6 +94,7 @@ class TransparentButton : public CustomButton { |
public: |
TransparentButton(ButtonListener* listener) |
: CustomButton(listener) { |
+ SetFocusBehavior(views::View::FocusBehavior::NEVER); |
SetAnimationDuration(LabelButton::kHoverAnimationDurationMs); |
} |
~TransparentButton() override {} |
@@ -353,7 +354,11 @@ Combobox::Combobox(ui::ComboboxModel* model) |
arrow_button_(new TransparentButton(this)), |
weak_ptr_factory_(this) { |
ModelChanged(); |
- SetFocusable(true); |
+#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(); |
@@ -381,8 +386,6 @@ Combobox::Combobox(ui::ComboboxModel* model) |
text_button_->SetVisible(true); |
arrow_button_->SetVisible(true); |
- text_button_->SetFocusable(false); |
- arrow_button_->SetFocusable(false); |
AddChildView(text_button_); |
AddChildView(arrow_button_); |
} |