svelte-dnd-action 0.9.32 → 0.9.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1679,8 +1679,8 @@
1679
1679
  var currentIdx = elToIdx.get(originalDragTarget);
1680
1680
  originIndex = currentIdx;
1681
1681
  originDropZone = originalDragTarget.parentElement;
1682
- /** @type {ShadowRoot | HTMLDocument} */
1683
- var rootNode = originDropZone.getRootNode();
1682
+ /** @type {ShadowRoot | HTMLDocument | Element } */
1683
+ var rootNode = originDropZone.closest("dialog") || originDropZone.getRootNode();
1684
1684
  var originDropZoneRoot = rootNode.body || rootNode;
1685
1685
  var items = config.items,
1686
1686
  type = config.type,
package/dist/index.mjs CHANGED
@@ -1673,8 +1673,8 @@ function dndzone(node, options) {
1673
1673
  var currentIdx = elToIdx.get(originalDragTarget);
1674
1674
  originIndex = currentIdx;
1675
1675
  originDropZone = originalDragTarget.parentElement;
1676
- /** @type {ShadowRoot | HTMLDocument} */
1677
- var rootNode = originDropZone.getRootNode();
1676
+ /** @type {ShadowRoot | HTMLDocument | Element } */
1677
+ var rootNode = originDropZone.closest("dialog") || originDropZone.getRootNode();
1678
1678
  var originDropZoneRoot = rootNode.body || rootNode;
1679
1679
  var items = config.items,
1680
1680
  type = config.type,
package/package.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "dist"
44
44
  ],
45
45
  "description": "*An awesome drag and drop library for Svelte 3 and 4 (not using the browser's built-in dnd, thanks god): Rich animations, nested containers, touch support and more *",
46
- "version": "0.9.32",
46
+ "version": "0.9.33",
47
47
  "repository": {
48
48
  "type": "git",
49
49
  "url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"
@@ -383,8 +383,8 @@ export function dndzone(node, options) {
383
383
  const currentIdx = elToIdx.get(originalDragTarget);
384
384
  originIndex = currentIdx;
385
385
  originDropZone = originalDragTarget.parentElement;
386
- /** @type {ShadowRoot | HTMLDocument} */
387
- const rootNode = originDropZone.getRootNode();
386
+ /** @type {ShadowRoot | HTMLDocument | Element } */
387
+ const rootNode = originDropZone.closest("dialog") || originDropZone.getRootNode();
388
388
  const originDropZoneRoot = rootNode.body || rootNode;
389
389
  const {items, type, centreDraggedOnCursor} = config;
390
390
  draggedElData = {...items[currentIdx]};