diff --git a/dist/amd/dragula.js b/dist/amd/dragula.js index 0c3682a..be58c33 100644 --- a/dist/amd/dragula.js +++ b/dist/amd/dragula.js @@ -309,7 +309,7 @@ define(['exports', 'aurelia-dependency-injection', './touchy', './options', './u Dragula.prototype.drop = function drop(item, target) { var prevSibling = item.previousSibling; if (this._currentSibling == null && prevSibling && prevSibling.nodeName === '#comment' && prevSibling.data === 'anchor') { - target.insertBefore(prevSibling); + target.insertBefore(item, prevSibling); } if (this._copy && this.options.copySortSource && target === this._source) { var parent = _util.Util.getParent(this._item); diff --git a/dist/aurelia-dragula.js b/dist/aurelia-dragula.js index 217ec64..326708f 100644 --- a/dist/aurelia-dragula.js +++ b/dist/aurelia-dragula.js @@ -471,7 +471,7 @@ export class Dragula { const prevSibling = item.previousSibling if (this._currentSibling == null && prevSibling && prevSibling.nodeName === '#comment' && prevSibling.data === 'anchor') { - target.insertBefore(prevSibling) + target.insertBefore(item, prevSibling) } if (this._copy && this.options.copySortSource && target === this._source) { let parent = Util.getParent(this._item) diff --git a/dist/commonjs/dragula.js b/dist/commonjs/dragula.js index 77ceb92..5f22b7d 100644 --- a/dist/commonjs/dragula.js +++ b/dist/commonjs/dragula.js @@ -281,7 +281,7 @@ var Dragula = exports.Dragula = function () { Dragula.prototype.drop = function drop(item, target) { var prevSibling = item.previousSibling; if (this._currentSibling == null && prevSibling && prevSibling.nodeName === '#comment' && prevSibling.data === 'anchor') { - target.insertBefore(prevSibling); + target.insertBefore(item, prevSibling); } if (this._copy && this.options.copySortSource && target === this._source) { var parent = _util.Util.getParent(this._item); diff --git a/dist/system/dragula.js b/dist/system/dragula.js index e75ab60..589a305 100644 --- a/dist/system/dragula.js +++ b/dist/system/dragula.js @@ -304,7 +304,7 @@ System.register(['aurelia-dependency-injection', './touchy', './options', './uti Dragula.prototype.drop = function drop(item, target) { var prevSibling = item.previousSibling; if (this._currentSibling == null && prevSibling && prevSibling.nodeName === '#comment' && prevSibling.data === 'anchor') { - target.insertBefore(prevSibling); + target.insertBefore(item, prevSibling); } if (this._copy && this.options.copySortSource && target === this._source) { var parent = Util.getParent(this._item); diff --git a/package.json b/package.json index 7366ffb..b9dd026 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-dragula", - "version": "2.0.0", + "version": "2.0.1", "description": "An aurelia compatible version of Dragula", "keywords": [ "aurelia",