]> source.dussan.org Git - vaadin-framework.git/commitdiff
#8722 Move handling of scrolling from VWindow to FocusableScrollPanel
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>
Fri, 11 May 2012 15:31:16 +0000 (15:31 +0000)
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>
Fri, 11 May 2012 15:31:16 +0000 (15:31 +0000)
svn changeset:23723/svn branch:6.8

src/com/vaadin/terminal/gwt/client/ui/FocusableScrollPanel.java
src/com/vaadin/terminal/gwt/client/ui/VWindow.java

index 460c474e66dad0c05f8b00cfbde7042501d921ab..60f58fb37e81222267727a15a48349ee8aeabba6 100644 (file)
@@ -34,8 +34,8 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements
 
     public FocusableScrollPanel() {
         // Prevent IE standard mode bug when a AbsolutePanel is contained.
+        TouchScrollDelegate.enableTouchScrolling(this, getElement());
         Style style = getElement().getStyle();
-        style.setOverflow(Overflow.AUTO);
         style.setProperty("zoom", "1");
         style.setPosition(Position.RELATIVE);
     }
@@ -162,7 +162,8 @@ public class FocusableScrollPanel extends SimpleFocusablePanel implements
      *            the new vertical scroll position, in pixels
      */
     public void setScrollPosition(int position) {
-        if (BrowserInfo.get().isAndroidWithBrokenScrollTop()) {
+        if (BrowserInfo.get().isAndroidWithBrokenScrollTop()
+                && BrowserInfo.get().requiresTouchScrollDelegate()) {
             ArrayList<com.google.gwt.dom.client.Element> elements = TouchScrollDelegate
                     .getElements(getElement());
             for (com.google.gwt.dom.client.Element el : elements) {
index d756eaf8b0423af134c0f033358a72be465be837..2355a9c65a1808d989b7bee52fca717297a97f12 100644 (file)
@@ -205,9 +205,6 @@ public class VWindow extends VOverlay implements Container,
         contentPanel.addKeyDownHandler(this);
         contentPanel.addFocusHandler(this);
         contentPanel.addBlurHandler(this);
-
-        TouchScrollDelegate.enableTouchScrolling(this, getContainerElement()
-                .getFirstChildElement());
     }
 
     public void bringToFront() {