Browse Source

Merge pull request #526 from ePages-de/suppress-hierarchy-error

don't try to nest parent in child Sortable
pull/514/merge
Lebedev Konstantin 9 years ago
parent
commit
f68710a455
  1. 14
      Sortable.js
  2. 2
      Sortable.min.js

14
Sortable.js

@ -603,7 +603,9 @@
_cloneHide(isOwner);
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect) !== false) {
el.appendChild(dragEl);
if (!dragEl.contains(el)) {
el.appendChild(dragEl);
}
this._animate(dragRect, dragEl);
target && this._animate(targetRect, target);
}
@ -650,10 +652,12 @@
after = (nextSibling !== dragEl) && !isLong || halfway && isLong;
}
if (after && !nextSibling) {
el.appendChild(dragEl);
} else {
target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
if (!dragEl.contains(el)) {
if (after && !nextSibling) {
el.appendChild(dragEl);
} else {
target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
}
}
this._animate(dragRect, dragEl);

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save