diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2015-03-23 15:47:50 +0200 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2015-03-23 16:05:06 +0200 |
commit | 1575b9cb003db8c336166c8a717413c9418cd2e2 (patch) | |
tree | 2acce6e8c69907daadc46fbcbe002e4d0f97b8f4 | |
parent | 20d5456c3d5fb825783d7311ebd797c9ae8690f9 (diff) | |
download | vaadin-framework-1575b9cb003db8c336166c8a717413c9418cd2e2.tar.gz vaadin-framework-1575b9cb003db8c336166c8a717413c9418cd2e2.zip |
Fixes Grid column reordering for IE8 (#17023)
Change-Id: I44373a22fb279d5fd260fec0cfaf52d4a3f4e9a3
-rw-r--r-- | client/src/com/vaadin/client/widget/grid/AutoScroller.java | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/client/src/com/vaadin/client/widget/grid/AutoScroller.java b/client/src/com/vaadin/client/widget/grid/AutoScroller.java index 773dc012c8..83d8bf0b62 100644 --- a/client/src/com/vaadin/client/widget/grid/AutoScroller.java +++ b/client/src/com/vaadin/client/widget/grid/AutoScroller.java @@ -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. |