]> source.dussan.org Git - vaadin-framework.git/commitdiff
ITable: now scrolls to right position with Firefox
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 21 Dec 2007 07:00:26 +0000 (07:00 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 21 Dec 2007 07:00:26 +0000 (07:00 +0000)
svn changeset:3289/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java

index 59096ecda644a2313adb7308144940ad1f61271f..05931faee986335b3370d257eb768bdb293cf8da 100644 (file)
@@ -580,9 +580,15 @@ public class IScrollTable extends Composite implements Table, ScrollListener,
         }
 
         if (firstvisible > 0) {
-            bodyContainer
-                    .setScrollPosition(firstvisible * tBody.getRowHeight());
-            firstRowInViewPort = firstvisible;
+            // Deferred due some Firefox oddities. IE & Safari could survive
+            // without
+            DeferredCommand.addCommand(new Command() {
+                public void execute() {
+                    bodyContainer.setScrollPosition(firstvisible
+                            * tBody.getRowHeight());
+                    firstRowInViewPort = firstvisible;
+                }
+            });
         }
 
         DeferredCommand.addCommand(new Command() {