aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMarkus Koivisto <markus@vaadin.com>2014-06-12 17:38:44 +0300
committerVaadin Code Review <review@vaadin.com>2014-06-17 07:56:59 +0000
commitd076dc7317b4f211e95ef560442793cb1200cfc9 (patch)
tree42a20ba8cf4b90b3ab9551e9ae7bbf0c7f0a3aba /client
parent545b3a43bf8953c8976de518bfc618cae0564b9a (diff)
downloadvaadin-framework-d076dc7317b4f211e95ef560442793cb1200cfc9.tar.gz
vaadin-framework-d076dc7317b4f211e95ef560442793cb1200cfc9.zip
Prevent table from scrolling on selectionChange when in Multiselect mode (#13341)
Change-Id: Ie3df61fab6d76dce3e2027cd732d0e6e7dd299e9
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VScrollTable.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java
index d3317abd4d..f8b1ff8d83 100644
--- a/client/src/com/vaadin/client/ui/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/VScrollTable.java
@@ -1082,12 +1082,20 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
selected = true;
keyboardSelectionOverRowFetchInProgress = true;
}
- if (selected) {
+ if (isSingleSelectMode() && selected) {
+
if (focusedRow == null
|| !selectedRowKeys.contains(focusedRow
.getKey())) {
- // The focus is no longer on a selected row,
- // move focus to first selected row
+ /*
+ * The focus is no longer on a selected row. If we
+ * are in single select mode, move focus to the
+ * selected row. (#10522)
+ *
+ * Don't modify the focused row when in multiselect
+ * mode. (#13341)
+ */
+
setRowFocus(row);
}
}