Skip to content

Commit e7b4859

Browse files
authored
Merge pull request #2347 from driskull/master
fix: set the target as the host element when target contains a shadowRoot
2 parents 41ff81f + 9fab4b9 commit e7b4859

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Sortable.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ import {
3535
scrollBy,
3636
clone,
3737
expando,
38-
getChildContainingRectFromElement
38+
getChildContainingRectFromElement,
39+
getParentOrHost
3940
} from './utils.js';
4041

4142

@@ -781,7 +782,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
781782
target = parent; // store last element
782783
}
783784
/* jshint boss:true */
784-
while (parent = parent.parentNode);
785+
while (parent = getParentOrHost(parent));
785786
}
786787

787788
_unhideGhostForTarget();

0 commit comments

Comments
 (0)