diff --git a/source/js/jquery-sortable.js b/source/js/jquery-sortable.js index 099a0d2..2d89427 100644 --- a/source/js/jquery-sortable.js +++ b/source/js/jquery-sortable.js @@ -290,12 +290,13 @@ if(this.dragging){ // processing Drop, check if placeholder is detached - if(this.placeholder.closest("html")[0]) + if(this.placeholder.closest("html")[0]){ this.placeholder.before(this.item).detach() - else + this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e) + } else { this.options.onCancel(this.item, this.itemContainer, groupDefaults.onCancel, e) - - this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e) + this.options.onDrop(this.item, this.itemContainer, groupDefaults.onDrop, e) + } // cleanup this.clearDimensions()