summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorMarkus Koivisto <markus@vaadin.com>2014-06-18 11:06:53 +0300
committerVaadin Code Review <review@vaadin.com>2014-06-24 06:05:26 +0000
commit413aace227c47bfbb5df6f33953f5cf854f3f3dd (patch)
tree21793872703e2919edd115a79fd956317952feb0 /client
parent32e9e4967612e99e001f70d9b9898ab8b17703f9 (diff)
downloadvaadin-framework-413aace227c47bfbb5df6f33953f5cf854f3f3dd.tar.gz
vaadin-framework-413aace227c47bfbb5df6f33953f5cf854f3f3dd.zip
Selecting in a mulsel table should focus, not scroll. (#13341, #10522)
Previous patch caused a regression that was caught by tests for #10522. Change-Id: I3ebc6a3ffe08c24d463cc70d95c4417d465fc490
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VScrollTable.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java
index f8b1ff8d83..7ec6845a11 100644
--- a/client/src/com/vaadin/client/ui/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/VScrollTable.java
@@ -1082,18 +1082,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
selected = true;
keyboardSelectionOverRowFetchInProgress = true;
}
- if (isSingleSelectMode() && selected) {
+ if (selected) {
if (focusedRow == null
|| !selectedRowKeys.contains(focusedRow
.getKey())) {
/*
- * 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)
+ * The focus is no longer on a selected row. Move
+ * focus to the selected row. (#10522)
*/
setRowFocus(row);
@@ -7266,7 +7262,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;
}