]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix Grid SubPart API to allow finding body element (#13334)
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Fri, 8 Aug 2014 06:54:33 +0000 (09:54 +0300)
committerTeemu Suo-Anttila <teemusa@vaadin.com>
Fri, 8 Aug 2014 21:23:22 +0000 (21:23 +0000)
Change-Id: I908fb6902f96e3c2b76091f6e40aeb0556d78b27

client/src/com/vaadin/client/ui/grid/Grid.java

index d1858a8f3f027a4a0e37739c9553edd4745d7ae2..d5582e02026c5001802d422d6d1c68e5c6e0a323 100644 (file)
@@ -2027,7 +2027,7 @@ public class Grid<T> extends Composite implements
         } else if (type.equalsIgnoreCase("cell")) {
             // If wanted row is not visible, we need to scroll there.
             Range visibleRowRange = escalator.getVisibleRowRange();
-            if (!visibleRowRange.contains(indices[0])) {
+            if (indices.length > 0 && !visibleRowRange.contains(indices[0])) {
                 try {
                     scrollToRow(indices[0]);
                 } catch (IllegalArgumentException e) {