-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ mock.png | |
.*.sw* | ||
.build* | ||
jquery.fn.* | ||
.idea/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,7 +275,8 @@ | |
fallbackClass: 'sortable-fallback', | ||
fallbackOnBody: false, | ||
fallbackTolerance: 0, | ||
fallbackOffset: {x: 0, y: 0} | ||
fallbackOffset: {x: 0, y: 0}, | ||
supportPointer: Sortable.supportPointer !== false, | ||
}; | ||
|
||
|
||
|
@@ -299,7 +300,7 @@ | |
// Bind events | ||
_on(el, 'mousedown', this._onTapStart); | ||
_on(el, 'touchstart', this._onTapStart); | ||
_on(el, 'pointerdown', this._onTapStart); | ||
options.supportPointer && _on(el, 'pointerdown', this._onTapStart); | ||
|
||
if (this.nativeDraggable) { | ||
_on(el, 'dragover', this); | ||
|
@@ -440,8 +441,8 @@ | |
_on(ownerDocument, 'mouseup', _this._onDrop); | ||
_on(ownerDocument, 'touchend', _this._onDrop); | ||
_on(ownerDocument, 'touchcancel', _this._onDrop); | ||
_on(ownerDocument, 'pointercancel', _this._onDrop); | ||
_on(ownerDocument, 'selectstart', _this); | ||
options.supportPointer && _on(ownerDocument, 'pointercancel', _this._onDrop); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
NavidZ
|
||
|
||
if (options.delay) { | ||
// If the user moves the pointer or let go the click or touch | ||
|
@@ -452,7 +453,7 @@ | |
_on(ownerDocument, 'touchcancel', _this._disableDelayedDrag); | ||
_on(ownerDocument, 'mousemove', _this._disableDelayedDrag); | ||
_on(ownerDocument, 'touchmove', _this._disableDelayedDrag); | ||
_on(ownerDocument, 'pointermove', _this._disableDelayedDrag); | ||
options.supportPointer && _on(ownerDocument, 'pointermove', _this._disableDelayedDrag); | ||
|
||
_this._dragStartTimer = setTimeout(dragStartFn, options.delay); | ||
} else { | ||
|
@@ -674,8 +675,11 @@ | |
_on(document, 'touchmove', _this._onTouchMove); | ||
_on(document, 'touchend', _this._onDrop); | ||
_on(document, 'touchcancel', _this._onDrop); | ||
_on(document, 'pointermove', _this._onTouchMove); | ||
_on(document, 'pointerup', _this._onDrop); | ||
|
||
if (options.supportPointer) { | ||
_on(document, 'pointermove', _this._onTouchMove); | ||
_on(document, 'pointerup', _this._onDrop); | ||
} | ||
} else { | ||
// Old brwoser | ||
_on(document, 'mousemove', _this._onTouchMove); | ||
|
@RubaXa, do you happen to remember why this line is even here in the first place? What scenario were you trying to address to call onDrop when getting pointercancel/touchcancel?