diff --git a/Sortable.js b/Sortable.js index 3ded4ef..197c767 100644 --- a/Sortable.js +++ b/Sortable.js @@ -1002,13 +1002,18 @@ return el; } } - while (el = ('host' in el && typeof el.host !== 'string') ? el.host : el.parentNode) + while (el = _getParentOrHost(el)) } return null; } + function _getParentOrHost(el) { + var parent = el.host; + + return (parent && parent.nodeType) ? parent : el.parentNode; + } function _globalDragOver(/**Event*/evt) {