From 251f248f426df40808d65ad8aa1c7a5e6edc16a6 Mon Sep 17 00:00:00 2001 From: Markus Koivisto Date: Tue, 5 Aug 2014 15:02:45 +0300 Subject: Revert "Keyboard shift-selection now works as expected in VScrollTable. (#14094)" This reverts commit 441371a. The commit caused rows selected in a multiselect table to no longer be focused, which caused a number of regressions. Change-Id: I42d960cec9dfe24852b40a623f32e2b467704491 --- client/src/com/vaadin/client/ui/VScrollTable.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 5e6207f53f..59645aa6d3 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -1093,17 +1093,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets, /* * The focus is no longer on a selected row. Move * focus to the selected row. (#10522) - * - * Don't do this for multiselect (#13341). - * - * Checking the selection mode here instead of in - * setRowFocus allows keyboard shift+downarrow - * selection to work as expected. */ - if (isSingleSelectMode()) { - setRowFocus(row); - } + setRowFocus(row); } } if (selected != row.isSelected()) { @@ -7256,7 +7248,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // Set new focused row focusedRow = row; - ensureRowIsVisible(row); + /* + * Don't scroll to the focused row when in multiselect mode. + * (#13341) + */ + + if (isSingleSelectMode()) { + ensureRowIsVisible(row); + } return true; } -- cgit v1.2.3