Skip to content

Commit

Permalink
build release
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann committed May 21, 2021
1 parent d680bce commit 307fc7e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions docs/html5sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1114,10 +1114,17 @@ var sortable = (function () {
.filter(function (placeholder) { return placeholder instanceof HTMLElement; })
// only elements in DOM
.filter(isInDom)[0];
// attach element after placeholder
insertAfter(visiblePlaceholder, dragging);
// remove placeholder from dom
visiblePlaceholder.remove();
if (visiblePlaceholder) {
// attach element after placeholder
insertAfter(visiblePlaceholder, dragging);
// remove placeholder from dom
visiblePlaceholder.remove();
}
else {
// set the dropped value to 'false' to delete copied dragging at the time of 'dragend'
addData(dragging, 'dropped', 'false');
return;
}
/*
* Fires Custom Event - 'sortstop'
*/
Expand Down

0 comments on commit 307fc7e

Please sign in to comment.