]> source.dussan.org Git - vaadin-framework.git/commitdiff
[merge from 6.7] Fixed #8639: Table context menu was broken on touch devices
authorAutomerge <automerge@vaadin.com>
Fri, 13 Apr 2012 09:13:47 +0000 (09:13 +0000)
committerAutomerge <automerge@vaadin.com>
Fri, 13 Apr 2012 09:13:47 +0000 (09:13 +0000)
svn changeset:23528/svn branch:6.8

src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java

index 43908d474a8941aa42fcd9467b252ab242a2b93f..a28aebae68e7eddca975311818b3b562440aefb9 100644 (file)
@@ -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);