summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-05-18 23:40:25 +0300
committerVaadin Code Review <review@vaadin.com>2015-05-25 20:44:58 +0000
commita562635f09cbb9d7a7d550a7429de754609bc384 (patch)
treebf379d0170a101c94751068f4b50380122570da3 /client
parent67bc52308036d72e96189e398b6cf2752a337b84 (diff)
downloadvaadin-framework-a562635f09cbb9d7a7d550a7429de754609bc384.tar.gz
vaadin-framework-a562635f09cbb9d7a7d550a7429de754609bc384.zip
Only sort when enter is pressed on default header (#16732)
Change-Id: I3bae7c341064f26c6be3c9b66b33239716043fec
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/widgets/Grid.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java
index 07074eeddf..53e0566e8d 100644
--- a/client/src/com/vaadin/client/widgets/Grid.java
+++ b/client/src/com/vaadin/client/widgets/Grid.java
@@ -5056,9 +5056,12 @@ public class Grid<T> extends ResizeComposite implements
if (event.getNativeKeyCode() != KeyCodes.KEY_ENTER) {
return;
}
-
- sorter.sort(event.getFocusedCell().getColumn(),
- event.isShiftKeyDown());
+ if (getHeader().getRow(event.getFocusedCell().getRowIndex())
+ .isDefault()) {
+ // Only sort for enter on the default header
+ sorter.sort(event.getFocusedCell().getColumn(),
+ event.isShiftKeyDown());
+ }
}
});