]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes Grid column reordering for IE8 (#17023)
authorPekka Hyvönen <pekka@vaadin.com>
Mon, 23 Mar 2015 13:47:50 +0000 (15:47 +0200)
committerPekka Hyvönen <pekka@vaadin.com>
Mon, 23 Mar 2015 14:05:06 +0000 (16:05 +0200)
Change-Id: I44373a22fb279d5fd260fec0cfaf52d4a3f4e9a3

client/src/com/vaadin/client/widget/grid/AutoScroller.java

index 773dc012c84971f83ce3b6963add61c2080d87eb..83d8bf0b621b4674caedcbb5031ead52123688de 100644 (file)
@@ -18,7 +18,6 @@ package com.vaadin.client.widget.grid;
 import com.google.gwt.animation.client.AnimationScheduler;
 import com.google.gwt.animation.client.AnimationScheduler.AnimationCallback;
 import com.google.gwt.animation.client.AnimationScheduler.AnimationHandle;
-import com.google.gwt.dom.client.BrowserEvents;
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.dom.client.NativeEvent;
 import com.google.gwt.dom.client.TableElement;
@@ -456,8 +455,7 @@ public class AutoScroller {
     }
 
     /**
-     * Starts the automatic scrolling detection. The given event must be a touch
-     * start or a left mouse triggered mouse down event.
+     * Starts the automatic scrolling detection.
      * 
      * @param startEvent
      *            the event that starts the automatic scroll
@@ -468,19 +466,12 @@ public class AutoScroller {
      */
     public void start(final NativeEvent startEvent, ScrollAxis scrollAxis,
             AutoScrollerCallback callback) {
-        if (BrowserEvents.TOUCHSTART.equals(startEvent.getType())
-                || (BrowserEvents.MOUSEDOWN.equals(startEvent.getType()) && startEvent
-                        .getButton() == NativeEvent.BUTTON_LEFT)) {
-            scrollDirection = scrollAxis;
-            this.callback = callback;
-            injectNativeHandler();
-            start(startEvent);
-            startEvent.preventDefault();
-            startEvent.stopPropagation();
-        } else {
-            throw new IllegalStateException("received unexpected event: "
-                    + startEvent.getType());
-        }
+        scrollDirection = scrollAxis;
+        this.callback = callback;
+        injectNativeHandler();
+        start();
+        startEvent.preventDefault();
+        startEvent.stopPropagation();
     }
 
     /**
@@ -526,7 +517,7 @@ public class AutoScroller {
         return scrollAreaPX;
     }
 
-    private void start(final NativeEvent event) {
+    private void start() {
         /*
          * bounds are updated whenever the autoscroll cycle starts, to make sure
          * that the widget hasn't changed in size, moved around, or whatnot.