From 7f0a4637eab4db9a1589e299212de9c037f0165b Mon Sep 17 00:00:00 2001 From: Matt Driscoll Date: Wed, 14 Feb 2024 11:01:53 -0800 Subject: [PATCH] fix: set the target as the host element when target contains a shadowRoot. #2346 --- src/Sortable.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Sortable.js b/src/Sortable.js index 74045d4f4..e091810fb 100644 --- a/src/Sortable.js +++ b/src/Sortable.js @@ -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; }