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

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

Issue 2739893003: views: make comboboxes request focus when clicked (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index cadbfa49efd367ed131bc4e0438cde90ddbe24d2..24c51702b2d11798c62274c4add4f29ea5629a8b 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -131,8 +131,11 @@ class TransparentButton : public CustomButton {
~TransparentButton() override {}
bool OnMousePressed(const ui::MouseEvent& mouse_event) override {
- if (!UseMd())
- parent()->RequestFocus();
+#if !defined(OS_MACOSX)
+ // On Mac, comboboxes do not take focus on mouse click, but on other
+ // platforms they do.
+ parent()->RequestFocus();
+#endif
return CustomButton::OnMousePressed(mouse_event);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698