]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #4206 - Setting scroll position doesn't work with Webkit browsers
authorArtur Signell <artur.signell@itmill.com>
Tue, 23 Feb 2010 12:54:23 +0000 (12:54 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 23 Feb 2010 12:54:23 +0000 (12:54 +0000)
svn changeset:11497/svn branch:6.3

src/com/vaadin/terminal/gwt/client/ui/VView.java

index 838b60a6d8b0f845dc7787afa33b14cb90bc513c..033d35dab1e4b950b989192ff24ded2dee6f5ff8 100644 (file)
@@ -372,10 +372,6 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
 
         onResize(Window.getClientWidth(), Window.getClientHeight());
 
-        if (BrowserInfo.get().isSafari()) {
-            Util.runWebkitOverflowAutoFix(getElement());
-        }
-
         // finally set scroll position from UIDL
         if (uidl.hasVariable("scrollTop")) {
             scrollable = true;
@@ -387,6 +383,12 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
             scrollable = false;
         }
 
+        // Safari workaround must be run after scrollTop is updated as it sets
+        // scrollTop using a deferred command.
+        if (BrowserInfo.get().isSafari()) {
+            Util.runWebkitOverflowAutoFix(getElement());
+        }
+
         rendering = false;
     }