From c5095d2981e34cd857c04767a2fcf3a8b5c7f309 Mon Sep 17 00:00:00 2001 From: Automerge Date: Fri, 13 Apr 2012 09:13:52 +0000 Subject: [merge from 6.7] #8639 Improved comments svn changeset:23529/svn branch:6.8 --- .../terminal/gwt/client/ui/VScrollTable.java | 31 ++++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index a28aebae68..ee33f33758 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -5229,23 +5229,32 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, public void run() { TouchScrollDelegate activeScrollDelegate = TouchScrollDelegate .getActiveScrollDelegate(); + /* + * If there's a scroll delegate, check if + * we're actually scrolling and handle it. + * If no delegate, do nothing here and let + * the row handle potential drag'n'drop or + * context menu. + */ if (activeScrollDelegate != null) { - if (!activeScrollDelegate.isMoved()) { + if (activeScrollDelegate.isMoved()) { /* - * scrolling hasn't started. Cancel - * scrolling and let row handle this - * as drag start or context menu. + * Prevent the row from handling + * touch move/end events (the + * delegate handles those) and from + * doing drag'n'drop or opening a + * context menu. */ - activeScrollDelegate - .stopScrolling(); + touchStart = null; } else { /* - * Scrolled or scrolling, clear - * touch start to indicate that row - * shouldn't handle touch move/end - * events. + * Scrolling hasn't started, so + * cancel delegate and let the row + * handle potential drag'n'drop or + * context menu. */ - touchStart = null; + activeScrollDelegate + .stopScrolling(); } } } -- cgit v1.2.3