Skip to content

Commit ddd0597

Browse files
authored
Merge pull request #2431 from marvinscharle/fix/sortable-crashes-shadow-dom
Fix: Sortable Freezes Browser (Shadow DOM)
2 parents 63ecb31 + bd74abb commit ddd0597

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function matches(/**HTMLElement*/el, /**String*/selector) {
3838
}
3939

4040
function getParentOrHost(el) {
41-
return (el.host && el !== document && el.host.nodeType)
41+
return (el.host && el !== document && el.host.nodeType && el.host !== el)
4242
? el.host
4343
: el.parentNode;
4444
}
@@ -256,7 +256,7 @@ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoS
256256

257257
/**
258258
* Returns the content rect of the element (bounding rect minus border and padding)
259-
* @param {HTMLElement} el
259+
* @param {HTMLElement} el
260260
*/
261261
function getContentRect(el) {
262262
let rect = getRect(el);

0 commit comments

Comments
 (0)