summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2014-03-19 10:36:41 +0000
committerVaadin Code Review <review@vaadin.com>2014-03-19 10:37:32 +0000
commite45294f717f920a6dfbcf36aff68d25d9b00cca3 (patch)
tree009b75d7d98378ae8176f699aed99137ac9ecbaa
parent52dcbaaf056631d98715f39b1038d1abc81f5476 (diff)
downloadvaadin-framework-e45294f717f920a6dfbcf36aff68d25d9b00cca3.tar.gz
vaadin-framework-e45294f717f920a6dfbcf36aff68d25d9b00cca3.zip
Revert "Preventing premature start of drag due to Chrome move event #13381"
This reverts commit 7112abe944259a615e26342de17d0302ddec3562. Change-Id: I2bc231ec20c27b508570c6358fb2d8128beb2735
-rw-r--r--client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java b/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java
index 7de40f9496..b911c28a07 100644
--- a/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java
+++ b/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java
@@ -422,20 +422,13 @@ public class VDragAndDropManager {
}
case Event.ONMOUSEMOVE:
case Event.ONTOUCHMOVE:
- // only start the drag if the mouse / touch has moved a minimum distance
- int startX = Util.getTouchOrMouseClientX(currentDrag.getCurrentGwtEvent());
- int startY = Util.getTouchOrMouseClientY(currentDrag.getCurrentGwtEvent());
- int nowX = Util.getTouchOrMouseClientX(event.getNativeEvent());
- int nowY = Util.getTouchOrMouseClientY(event.getNativeEvent());
- if (Math.abs(startX - nowX) > 3 || Math.abs(startY - nowY) > 3) {
- if (deferredStartRegistration != null) {
- deferredStartRegistration.removeHandler();
- deferredStartRegistration = null;
- }
- currentDrag.setCurrentGwtEvent(event
- .getNativeEvent());
- startDrag.execute();
+ if (deferredStartRegistration != null) {
+ deferredStartRegistration.removeHandler();
+ deferredStartRegistration = null;
}
+ currentDrag.setCurrentGwtEvent(event
+ .getNativeEvent());
+ startDrag.execute();
break;
default:
// on any other events, clean up the