From 8f2aa5eb68f5f31fc1cd0db7a5a3d76c06878803 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Mon, 26 Jan 2015 16:02:31 +0300 Subject: [PATCH] + create 'cloneEl' on dragStart --- Sortable.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Sortable.js b/Sortable.js index 31386d3..38dbb77 100644 --- a/Sortable.js +++ b/Sortable.js @@ -276,13 +276,6 @@ } } catch (err) { } - - - if (activeGroup.pull == 'clone') { - cloneEl = dragEl.cloneNode(true); - _css(cloneEl, 'display', 'none'); - rootEl.insertBefore(cloneEl, dragEl); - } } }, @@ -347,6 +340,12 @@ this._offUpEvents(); + if (activeGroup.pull == 'clone') { + cloneEl = dragEl.cloneNode(true); + _css(cloneEl, 'display', 'none'); + rootEl.insertBefore(cloneEl, dragEl); + } + if (isTouch) { var rect = dragEl.getBoundingClientRect(), css = _css(dragEl),