Skip to content

Commit

Permalink
Merge pull request #2347 from driskull/master
Browse files Browse the repository at this point in the history
fix: set the target as the host element when target contains a shadowRoot
  • Loading branch information
owen-m1 authored Mar 22, 2024
2 parents 41ff81f + 9fab4b9 commit e7b4859
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ import {
scrollBy,
clone,
expando,
getChildContainingRectFromElement
getChildContainingRectFromElement,
getParentOrHost
} from './utils.js';


Expand Down Expand Up @@ -781,7 +782,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
target = parent; // store last element
}
/* jshint boss:true */
while (parent = parent.parentNode);
while (parent = getParentOrHost(parent));
}

_unhideGhostForTarget();
Expand Down

0 comments on commit e7b4859

Please sign in to comment.