summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAutomerge <automerge@vaadin.com>2012-04-13 09:13:47 +0000
committerAutomerge <automerge@vaadin.com>2012-04-13 09:13:47 +0000
commit1cf2e8e1bf024cdc60c3b06f08cf249bca95ebc8 (patch)
tree4e001ce815ca42b71ac514d93c55d53594f17797
parentf87be1cf342b23cf048b5c0e77559be3d7eed2b3 (diff)
downloadvaadin-framework-1cf2e8e1bf024cdc60c3b06f08cf249bca95ebc8.tar.gz
vaadin-framework-1cf2e8e1bf024cdc60c3b06f08cf249bca95ebc8.zip
[merge from 6.7] Fixed #8639: Table context menu was broken on touch devices
svn changeset:23528/svn branch:6.8
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java33
1 files 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);