Skip to content

Commit 7f0a463

Browse files
committed
fix: set the target as the host element when target contains a shadowRoot. #2346
1 parent 07708fa commit 7f0a463

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Sortable.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,10 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
755755

756756
while (target && target.shadowRoot) {
757757
target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
758+
const host = target.getRootNode().host;
759+
if (host) {
760+
target = host;
761+
}
758762
if (target === parent) break;
759763
parent = target;
760764
}

0 commit comments

Comments
 (0)