From d8d74e007836c47ce05f5ba97f2827b9d0d823eb Mon Sep 17 00:00:00 2001 From: Nikita SVIRIDENKO Date: Tue, 27 Sep 2016 18:08:00 +0200 Subject: [PATCH 1/2] Update Sortable.js In some cases `el.host` is the current host name --- Sortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sortable.js b/Sortable.js index 2776ed6..3ded4ef 100644 --- a/Sortable.js +++ b/Sortable.js @@ -1002,7 +1002,7 @@ return el; } } - while (el = ('host' in el) ? el.host : el.parentNode) + while (el = ('host' in el && typeof el.host !== 'string') ? el.host : el.parentNode) } return null; From ace2da13e272b36107c250db0be102cc42dadf26 Mon Sep 17 00:00:00 2001 From: Nikita SVIRIDENKO Date: Wed, 28 Sep 2016 10:26:18 +0200 Subject: [PATCH 2/2] Update Sortable.js --- Sortable.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) {