]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merged fixes for #4206 - "Setting scroll position doesn't work with Webkit browsers...
authorArtur Signell <artur.signell@itmill.com>
Tue, 23 Feb 2010 13:35:01 +0000 (13:35 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 23 Feb 2010 13:35:01 +0000 (13:35 +0000)
svn changeset:11501/svn branch:6.2

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

index f9da8f67d953e5665aaae3247f222941bf50c3ea..50fd8b7217cdf2b973d3ab1767fe2126ce02316a 100644 (file)
@@ -189,7 +189,6 @@ public class VPanel extends SimplePanel implements Container {
         }
         layout.updateFromUIDL(layoutUidl, client);
 
-        runHacks(false);
         // We may have actions attached to this panel
         if (uidl.getChildCount() > 1) {
             final int cnt = uidl.getChildCount();
@@ -224,6 +223,10 @@ public class VPanel extends SimplePanel implements Container {
             scrollLeft = contentNode.getScrollLeft();
         }
 
+        // Must be run after scrollTop is set as Webkit overflow fix re-sets the
+        // scrollTop
+        runHacks(false);
+
         rendering = false;
 
     }
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;
     }