From 92a431e37d3dcf432ea9ee9b63b7337163bd82ec Mon Sep 17 00:00:00 2001 From: jos Date: Mon, 7 May 2018 20:55:39 +0200 Subject: [PATCH] Fixed being able to drag an item after the "show more" area --- src/js/Node.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/js/Node.js b/src/js/Node.js index 88c1d4ac9..bbe220ff4 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -693,7 +693,14 @@ Node.prototype.moveBefore = function(node, beforeNode) { } if (beforeNode instanceof AppendNode) { - this.appendChild(node); + // the this.childs.length + 1 is to reckon with the node that we're about to add + if (this.childs.length + 1 > this.maxVisibleChilds) { + var lastVisibleNode = this.childs[this.maxVisibleChilds - 1]; + this.insertBefore(node, lastVisibleNode); + } + else { + this.appendChild(node); + } } else { this.insertBefore(node, beforeNode);