From 2f06d97b3627b6350a1d91b943a29f9b8ff0659a Mon Sep 17 00:00:00 2001 From: ChiefORZ Date: Tue, 23 Jun 2015 00:19:39 +0200 Subject: [PATCH] missed some stuff wasn't merging all necessary stuff. now it should be fully functional --- Sortable.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Sortable.js b/Sortable.js index e48916a..be7d423 100644 --- a/Sortable.js +++ b/Sortable.js @@ -45,6 +45,8 @@ tapEvt, touchEvt, + moved, + /** @const */ RSPACE = /\s+/g, @@ -442,6 +444,8 @@ touchEvt = touch; + moved = true; + _css(ghostEl, 'webkitTransform', translate3d); _css(ghostEl, 'mozTransform', translate3d); _css(ghostEl, 'msTransform', translate3d); @@ -682,9 +686,10 @@ this._offUpEvents(); if (evt) { - evt.preventDefault(); - !options.dropBubble && evt.stopPropagation(); - + if(moved) { + evt.preventDefault(); + !options.dropBubble && evt.stopPropagation(); + } ghostEl && ghostEl.parentNode.removeChild(ghostEl); if (dragEl) { @@ -742,6 +747,8 @@ tapEvt = touchEvt = + moved = + lastEl = lastCSS =