Skip to content

Commit

Permalink
SortableJS#422: fix fallback moves in owner container
Browse files Browse the repository at this point in the history
  • Loading branch information
sp-kilobug committed Jun 27, 2015
1 parent cb140f1 commit 0eb010e
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 0eb010e

Please sign in to comment.