diff options
author | Markus Koivisto <markus@vaadin.com> | 2014-06-26 16:35:42 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-07-28 12:17:10 +0000 |
commit | 441371ac98b2a99822ca1639a6823b23be93c229 (patch) | |
tree | 96c8d56784f0c673477bd9f3fe82d2e9c2d64389 /client | |
parent | 53a62dba548c52824066eb30b7ad122df6e270a4 (diff) | |
download | vaadin-framework-441371ac98b2a99822ca1639a6823b23be93c229.tar.gz vaadin-framework-441371ac98b2a99822ca1639a6823b23be93c229.zip |
Keyboard shift-selection now works as expected in VScrollTable. (#14094)
Change-Id: I0dcd9f75cd30fe91c17ca0755241e73a37da79ec
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 59645aa6d3..5e6207f53f 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -1093,9 +1093,17 @@ 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()) { @@ -7248,14 +7256,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // Set new focused row focusedRow = row; - /* - * Don't scroll to the focused row when in multiselect mode. - * (#13341) - */ - - if (isSingleSelectMode()) { - ensureRowIsVisible(row); - } + ensureRowIsVisible(row); return true; } |