提交 99405983 编写于 作者: A Alex Wild

Allow click events for touch devices

上级 54fc87c0
......@@ -45,6 +45,8 @@
tapEvt,
touchEvt,
moved,
/** @const */
RSPACE = /\s+/g,
......@@ -427,6 +429,8 @@
dy = touch.clientY - tapEvt.clientY,
translate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)';
moved = true;
touchEvt = touch;
_css(ghostEl, 'webkitTransform', translate3d);
......@@ -514,6 +518,8 @@
!options.dragoverBubble && evt.stopPropagation();
}
moved = true;
if (activeGroup && !options.disabled &&
(isOwner
? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
......@@ -666,8 +672,10 @@
this._offUpEvents();
if (evt) {
evt.preventDefault();
!options.dropBubble && evt.stopPropagation();
if (moved) {
evt.preventDefault();
!options.dropBubble && evt.stopPropagation();
}
ghostEl && ghostEl.parentNode.removeChild(ghostEl);
......@@ -726,6 +734,8 @@
tapEvt =
touchEvt =
moved =
lastEl =
lastCSS =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册