Parcourir la source

bugfixes to draglistener

Adam Shaw il y a 10 ans
Parent
commit
8fa2270320
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/common/DragListener.js

+ 2 - 2
src/common/DragListener.js

@@ -40,7 +40,7 @@ var DragListener = FC.DragListener = Class.extend(ListenerMixin, {
 	startInteraction: function(ev, extraOptions) {
 	startInteraction: function(ev, extraOptions) {
 		var isTouch = getEvIsTouch(ev);
 		var isTouch = getEvIsTouch(ev);
 
 
-		if (!isTouch) {
+		if (ev.type === 'mousedown') {
 			if (!isPrimaryMouseButton(ev)) {
 			if (!isPrimaryMouseButton(ev)) {
 				return;
 				return;
 			}
 			}
@@ -288,7 +288,7 @@ var DragListener = FC.DragListener = Class.extend(ListenerMixin, {
 	handleScroll: function(ev) {
 	handleScroll: function(ev) {
 		// if the drag is being initiated by touch, but a scroll happens before
 		// if the drag is being initiated by touch, but a scroll happens before
 		// the drag-initiating delay is over, cancel the drag
 		// the drag-initiating delay is over, cancel the drag
-		if (!this.isDragging) {
+		if (this.isTouch && !this.isDragging) {
 			this.endInteraction(ev);
 			this.endInteraction(ev);
 		}
 		}
 	},
 	},