Skip to content

Commit

Permalink
Merge pull request #9 from sp-kilobug/sp-kilobug-patch-2
Browse files Browse the repository at this point in the history
SortableJS#422: fix fallback moves in owner container
  • Loading branch information
sp-kilobug committed Jun 27, 2015
2 parents cb140f1 + 0eb010e commit 14ecef2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1057,9 +1057,11 @@

/** @returns {HTMLElement|false} */
function _ghostInBottom(el, evt) {
var lastEl = el.lastElementChild,
rect = lastEl.getBoundingClientRect();

var lastEl = el.lastElementChild;
if (lastEl===ghostEl) {
lastEl = lastEl.previousElementSibling || ghostEl;
}
var rect = lastEl.getBoundingClientRect();
return (evt.clientY - (rect.top + rect.height) > 5) && lastEl; // min delta
}

Expand Down

0 comments on commit 14ecef2

Please sign in to comment.