Skip to content

Commit

Permalink
fix: set the target as the host element when target contains a shadow…
Browse files Browse the repository at this point in the history
  • Loading branch information
driskull committed Feb 14, 2024
1 parent 07708fa commit 7f0a463
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,10 @@ Sortable.prototype = /** @lends Sortable.prototype */ {

while (target && target.shadowRoot) {
target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
const host = target.getRootNode().host;
if (host) {
target = host;
}
if (target === parent) break;
parent = target;
}
Expand Down

0 comments on commit 7f0a463

Please sign in to comment.