angular-sortable-view
angular-sortable-view copied to clipboard
Find a small bug
If add a drag ng-click event So in some cases this event will not be triggered.
I found a temporary one way is to put the preventDefault () method for stopPropagation () don't stop the default event, only need to ban the bubbling.
Like this will not stop dragging the click event.
But I don't know this will not cause other bugs, hope the author can see, thank you.
在源码中找到function onMousemove(e)
修改成function onMousemove(e){ if (clickEvent.clientX === e.clientX && clickEvent.clientY === e.clientY) { e.stopPropagation(); return false; } touchFix(e); if(!moveExecuted){ $element.parent().prepend(clone); moveExecuted = true; } $controllers[1].$moveUpdate(opts, { x: e.clientX, y: e.clientY, offset: pointerOffset }, clone, $element, placeholder, $controllers[0].getPart(), $scope.$index); }