Index: ui/views/controls/combobox/combobox.cc |
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc |
index 22512ea926c9607c8e663079041c636440412420..4d45cef24c8f50d9e7c433b5e91db35eaf48ca70 100644 |
--- a/ui/views/controls/combobox/combobox.cc |
+++ b/ui/views/controls/combobox/combobox.cc |
@@ -37,6 +37,7 @@ |
#include "ui/views/mouse_constants.h" |
#include "ui/views/painter.h" |
#include "ui/views/resources/grit/views_resources.h" |
+#include "ui/views/style/platform_style.h" |
#include "ui/views/widget/widget.h" |
namespace views { |
@@ -91,6 +92,9 @@ class TransparentButton : public CustomButton { |
public: |
TransparentButton(ButtonListener* listener) |
: CustomButton(listener) { |
+ SetAccessibilityFocusable(false); |
+ DCHECK(!IsFocusable()); |
+ |
SetAnimationDuration(LabelButton::kHoverAnimationDurationMs); |
} |
~TransparentButton() override {} |
@@ -350,7 +354,7 @@ Combobox::Combobox(ui::ComboboxModel* model) |
arrow_button_(new TransparentButton(this)), |
weak_ptr_factory_(this) { |
ModelChanged(); |
- SetFocusable(true); |
+ PlatformStyle::SetControlStyleFocus(this); |
UpdateBorder(); |
// Initialize the button images. |
@@ -375,8 +379,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_); |
} |