summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-09-21 11:10:43 +0300
committerPatrik Lindström <patrik@vaadin.com>2015-09-21 08:56:48 +0000
commit1695c1a6bd98328ce397e7ed63b9cb770ecb32eb (patch)
treea95a46ee3973670467f2c5fd9205d772093d10c9 /client
parent8f9538dffa369cf12342feeaca0752d20c35baf2 (diff)
downloadvaadin-framework-1695c1a6bd98328ce397e7ed63b9cb770ecb32eb.tar.gz
vaadin-framework-1695c1a6bd98328ce397e7ed63b9cb770ecb32eb.zip
Fix Grid internal focus tracking with Editor open (#18956)
Change-Id: I92b9f632960c041111ae9aada6055eab14a9bd81
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/widgets/Grid.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java
index 5dc8583423..6457200dd2 100644
--- a/client/src/com/vaadin/client/widgets/Grid.java
+++ b/client/src/com/vaadin/client/widgets/Grid.java
@@ -1360,6 +1360,11 @@ public class Grid<T> extends ResizeComposite implements
rowIndex = request.getRowIndex();
focusedColumnIndex = request.getColumnIndex();
+ if (focusedColumnIndex >= 0) {
+ // Update internal focus of Grid
+ grid.focusCell(rowIndex, focusedColumnIndex);
+ }
+
showOverlay();
}
}
@@ -1508,11 +1513,13 @@ public class Grid<T> extends ResizeComposite implements
}
if (this.rowIndex == rowIndex) {
- if (focusedColumnIndex != columnIndex
- && columnIndex >= grid.getFrozenColumnCount()) {
- // Scroll to new focused column.
- grid.getEscalator().scrollToColumn(columnIndex,
- ScrollDestination.ANY, 0);
+ if (focusedColumnIndex != columnIndex) {
+ if (columnIndex >= grid.getFrozenColumnCount()) {
+ // Scroll to new focused column.
+ grid.getEscalator().scrollToColumn(columnIndex,
+ ScrollDestination.ANY, 0);
+ }
+
focusedColumnIndex = columnIndex;
}