Chromium Code Reviews| Index: ui/views/controls/combobox/combobox.cc |
| diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc |
| index fa957ef61d42ff3e56837a359519e39d0f0516ae..adaf87060a0ca0fe49d6ebcda09306deaa463d43 100644 |
| --- a/ui/views/controls/combobox/combobox.cc |
| +++ b/ui/views/controls/combobox/combobox.cc |
| @@ -91,6 +91,7 @@ class TransparentButton : public CustomButton { |
| public: |
| TransparentButton(ButtonListener* listener) |
| : CustomButton(listener) { |
| + SetAccessibilityFocusable(false); |
|
tapted
2016/02/12 02:56:44
perhaps DCHECK(!IsFocusable()); after this? It's
karandeepb
2016/02/22 07:15:37
Done.
|
| SetAnimationDuration(LabelButton::kHoverAnimationDurationMs); |
| } |
| ~TransparentButton() override {} |
| @@ -350,7 +351,14 @@ Combobox::Combobox(ui::ComboboxModel* model) |
| arrow_button_(new TransparentButton(this)), |
| weak_ptr_factory_(this) { |
| ModelChanged(); |
| + |
| +#if !defined(OS_MACOSX) |
| SetFocusable(true); |
| +#else |
| + SetFocusable(false); |
| + SetAccessibilityFocusable(true); |
| +#endif |
| + |
| UpdateBorder(); |
| // Initialize the button images. |
| @@ -375,8 +383,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_); |
| } |