Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 9bb11af

Browse files
committed
fix(sortable): fix droptarget detection on directly nested sortables
1 parent 09c0112 commit 9bb11af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sortable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ angular.module('ui.sortable', [])
348348
// the value will be overwritten with the old value
349349
if (!ui.item.sortable.received) {
350350
ui.item.sortable.dropindex = getItemIndex(ui.item);
351-
var droptarget = ui.item.closest('[ui-sortable], [data-ui-sortable], [x-ui-sortable]');
351+
var droptarget = ui.item.parent().closest('[ui-sortable], [data-ui-sortable], [x-ui-sortable]');
352352
ui.item.sortable.droptarget = droptarget;
353353
ui.item.sortable.droptargetList = ui.item.parent();
354354

0 commit comments

Comments
 (0)