diff --git a/Sortable.js b/Sortable.js index b8be6fa..9c2dd08 100644 --- a/Sortable.js +++ b/Sortable.js @@ -639,7 +639,13 @@ after = (moveVector === 1); } else if (floating) { - after = (target.previousElementSibling === dragEl) && !isWide || halfway && isWide; + var elTop = dragEl.offsetTop, + tgTop = target.offsetTop; + if (elTop===tgTop) { + after = (target.previousElementSibling === dragEl) && !isWide || halfway && isWide; + } else { + after = tgTop > elTop; + } } else { after = (nextSibling !== dragEl) && !isLong || halfway && isLong; }