From 1cf2e8e1bf024cdc60c3b06f08cf249bca95ebc8 Mon Sep 17 00:00:00 2001 From: Automerge Date: Fri, 13 Apr 2012 09:13:47 +0000 Subject: [PATCH] [merge from 6.7] Fixed #8639: Table context menu was broken on touch devices svn changeset:23528/svn branch:6.8 --- .../terminal/gwt/client/ui/VScrollTable.java | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index 43908d474a..a28aebae68 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -5229,21 +5229,24 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, public void run() { TouchScrollDelegate activeScrollDelegate = TouchScrollDelegate .getActiveScrollDelegate(); - if (activeScrollDelegate != null - && !activeScrollDelegate.isMoved()) { - /* - * scrolling hasn't started. Cancel - * scrolling and let row handle this as - * drag start or context menu. - */ - activeScrollDelegate.stopScrolling(); - } else { - /* - * Scrolled or scrolling, clear touch - * start to indicate that row shouldn't - * handle touch move/end events. - */ - touchStart = null; + if (activeScrollDelegate != null) { + if (!activeScrollDelegate.isMoved()) { + /* + * scrolling hasn't started. Cancel + * scrolling and let row handle this + * as drag start or context menu. + */ + activeScrollDelegate + .stopScrolling(); + } else { + /* + * Scrolled or scrolling, clear + * touch start to indicate that row + * shouldn't handle touch move/end + * events. + */ + touchStart = null; + } } } }.schedule(TOUCHSCROLL_TIMEOUT); -- 2.39.5