Browse Source

#500: fixed clone

pull/560/merge
RubaXa 9 years ago
parent
commit
4d788baec8
  1. 6
      Sortable.js

6
Sortable.js

@ -585,7 +585,6 @@
target = _closest(evt.target, options.draggable, el); target = _closest(evt.target, options.draggable, el);
dragRect = dragEl.getBoundingClientRect(); dragRect = dragEl.getBoundingClientRect();
parentEl = target && target.parentNode || parentEl; // actualization
if (revert) { if (revert) {
_cloneHide(true); _cloneHide(true);
@ -604,7 +603,10 @@
if ((el.children.length === 0) || (el.children[0] === ghostEl) || if ((el.children.length === 0) || (el.children[0] === ghostEl) ||
(el === evt.target) && (target = _ghostIsLast(el, evt)) (el === evt.target) && (target = _ghostIsLast(el, evt))
) { ) {
if (target) { if (target) {
parentEl = target.parentNode; // actualization
if (target.animated) { if (target.animated) {
return; return;
} }
@ -622,6 +624,8 @@
} }
} }
else if (target && !target.animated && target !== dragEl && (target.parentNode[expando] !== void 0)) { else if (target && !target.animated && target !== dragEl && (target.parentNode[expando] !== void 0)) {
parentEl = target.parentNode; // actualization
if (lastEl !== target) { if (lastEl !== target) {
lastEl = target; lastEl = target;
lastCSS = _css(target); lastCSS = _css(target);

Loading…
Cancel
Save