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

Unified Diff: ui/views/controls/table/table_view.cc

Issue 2785473003: views::TableView - request focus on tap. (Closed)
Patch Set: rebase Created 3 years, 8 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 | ui/views/controls/table/table_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50f56720aef1e85c346b52731f79142e7c08362b..85ac949fb50142f884c6d06214b86e2b1de6a5ea 100644
--- a/ui/views/controls/table/table_view.cc
+++ b/ui/views/controls/table/table_view.cc
@@ -409,9 +409,11 @@ bool TableView::OnMousePressed(const ui::MouseEvent& event) {
}
void TableView::OnGestureEvent(ui::GestureEvent* event) {
- if (event->type() != ui::ET_GESTURE_TAP)
+ if (event->type() != ui::ET_GESTURE_TAP_DOWN)
return;
+ RequestFocus();
+
const int row = event->y() / row_height_;
if (row < 0 || row >= RowCount())
return;
« no previous file with comments | « no previous file | ui/views/controls/table/table_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698