svelte-dnd-action 0.9.59 → 0.9.60

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
@@ -1752,7 +1752,12 @@
1752
1752
 
1753
1753
  // dragging initiated by touch events prevents onclick from initially firing
1754
1754
  if (e.type === "touchend") {
1755
- e.target.click();
1755
+ var clickEvent = new Event("click", {
1756
+ bubbles: true,
1757
+ cancelable: true
1758
+ });
1759
+ // doing it this way instead of calling .click() because that doesn't work for SVG elements
1760
+ e.target.dispatchEvent(clickEvent);
1756
1761
  }
1757
1762
  }
1758
1763
  function handleMouseMoveMaybeDragStart(e) {
package/dist/index.mjs CHANGED
@@ -1746,7 +1746,12 @@ function dndzone$2(node, options) {
1746
1746
 
1747
1747
  // dragging initiated by touch events prevents onclick from initially firing
1748
1748
  if (e.type === "touchend") {
1749
- e.target.click();
1749
+ var clickEvent = new Event("click", {
1750
+ bubbles: true,
1751
+ cancelable: true
1752
+ });
1753
+ // doing it this way instead of calling .click() because that doesn't work for SVG elements
1754
+ e.target.dispatchEvent(clickEvent);
1750
1755
  }
1751
1756
  }
1752
1757
  function handleMouseMoveMaybeDragStart(e) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "svelte-dnd-action",
3
3
  "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 *",
4
- "version": "0.9.59",
4
+ "version": "0.9.60",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"
@@ -374,7 +374,12 @@ export function dndzone(node, options) {
374
374
 
375
375
  // dragging initiated by touch events prevents onclick from initially firing
376
376
  if (e.type === "touchend") {
377
- e.target.click();
377
+ const clickEvent = new Event("click", {
378
+ bubbles: true,
379
+ cancelable: true
380
+ });
381
+ // doing it this way instead of calling .click() because that doesn't work for SVG elements
382
+ e.target.dispatchEvent(clickEvent);
378
383
  }
379
384
  }
380
385