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

Unified Diff: ui/views/controls/table/table_view.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/table/table_view.cc
diff --git a/ui/views/controls/table/table_view.cc b/ui/views/controls/table/table_view.cc
index 3a289f3b22c571f2efd9c80a038016b68dbd04c8..a13c9d217f8dea18330399d91226b066602de192 100644
--- a/ui/views/controls/table/table_view.cc
+++ b/ui/views/controls/table/table_view.cc
@@ -145,7 +145,11 @@ TableView::TableView(ui::TableModel* model,
visible_column.column = columns[i];
visible_columns_.push_back(visible_column);
}
- SetFocusable(true);
+
+ // On Mac, except textfields and lists, no control should be focusable by
+ // default. In Cocoa, lists are generally represented using NSTableView. Hence
+ // use ALWAYS instead of CONTROL focus behavior for TableView.
+ SetFocusBehavior(ALWAYS);
SetModel(model);
}

Powered by Google App Engine
This is Rietveld 408576698