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

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

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Make patch smaller temporarily. Created 4 years, 9 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 270bdd5e0c701eb0200df5929baf314a3158296a..a349522a9d9b6efd425be06feab681a6eb17642e 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -92,6 +92,7 @@ class TransparentButton : public CustomButton {
public:
TransparentButton(ButtonListener* listener)
: CustomButton(listener) {
+ SetFocusBehavior(NEVER);
SetAnimationDuration(LabelButton::kHoverAnimationDurationMs);
}
~TransparentButton() override {}
@@ -351,7 +352,7 @@ Combobox::Combobox(ui::ComboboxModel* model)
arrow_button_(new TransparentButton(this)),
weak_ptr_factory_(this) {
ModelChanged();
- SetFocusable(true);
+ SetFocusBehavior(CONTROL);
UpdateBorder();
// Initialize the button images.
@@ -376,8 +377,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_);
}

Powered by Google App Engine
This is Rietveld 408576698