-
Bug
-
Resolution: Fixed
-
Normal
-
6.0.0, 5.0.11
-
None
Reproduce step :
1.drag the item out of the browser body.
------
It's cuasing by emulating the mouse event from touch event,
it's not firing mouse event after we drage out of the body in mouse event.
in domiso.js ,
function _createJQEvent (target, type, button, changedTouch, ofs) { //do not allow text try{ if (target.nodeType === 3 || target.nodeType === 8) target = target.parentNode;
When we try to emulate mouse event , the "document.elementFromPoint()" return a null
function _toMouseEvent(event, changedTouch) { switch (event.type) { case 'touchstart': return _createJQEvent(changedTouch.target, 'mousedown', 0, changedTouch); case 'touchend': return _createJQEvent( document.elementFromPoint( changedTouch.clientX, changedTouch.clientY), 'mouseup', 0, changedTouch); break; case 'touchmove': return _createJQEvent( document.elementFromPoint( changedTouch.clientX, changedTouch.clientY), 'mousemove', 0, changedTouch); break; } return event; }
Possible solution:
1. Refine the code in createJQEvent to check if target is null instead of calling undefined object.
2. not firing mousemove when the target is null ( more reasonable for me. )