@dosgato/dialog 1.0.0 → 1.0.2

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.
@@ -102,15 +102,15 @@ function headerDragStart(header, idx) {
102
102
  rightoftargetid = rightoftarget.getAttribute('id') ?? undefined;
103
103
  widthStart = dragtarget.clientWidth;
104
104
  width2Start = rightoftarget.clientWidth;
105
- mouseStart = e instanceof TouchEvent ? e.touches[0].screenX : e.screenX;
105
+ mouseStart = 'touches' in e ? e.touches[0].screenX : e.screenX;
106
106
  }
107
107
  };
108
108
  }
109
109
  function headerDrag(e) {
110
- if (e instanceof TouchEvent && e.touches.length > 1)
110
+ if ('touches' in e && e.touches?.length > 1)
111
111
  return;
112
112
  if (dragtargetid && rightoftargetid) {
113
- const screenX = e instanceof TouchEvent ? e.touches[0].screenX : e.screenX;
113
+ const screenX = 'touches' in e ? e.touches[0].screenX : e.screenX;
114
114
  store.setHeaderOverride(dragtargetid, `${widthStart - (mouseStart - screenX)}px`);
115
115
  store.setHeaderOverride(rightoftargetid, `${width2Start + (mouseStart - screenX)}px`);
116
116
  }
@@ -256,7 +256,7 @@ $: if ($dragging) {
256
256
  dragOverAbove = 0;
257
257
  }
258
258
  </script>
259
- <li>
259
+ <li role="presentation">
260
260
  {#if dropAbove}
261
261
  <div class="drop-above"
262
262
  class:dragOverAbove
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",