@johly/vaul-svelte 1.0.0-next.12 → 1.0.0-next.13

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.
@@ -109,6 +109,10 @@ export function useDrawerContent(opts) {
109
109
  const delta = { x: xPosition, y: yPosition };
110
110
  const isAllowedToSwipe = isDeltaInDirection(delta, ctx.direction.current, swipeStartThreshold);
111
111
  if (isAllowedToSwipe) {
112
+ // Prevent scrollable content from scrolling while dragging the drawer
113
+ if (ctx.isDragging) {
114
+ e.preventDefault();
115
+ }
112
116
  ctx.onDrag(e);
113
117
  // Prevent parent drawer from receiving the drag event
114
118
  if (ctx.nested.current) {
@@ -163,6 +167,10 @@ export function useDrawerContent(opts) {
163
167
  const delta = { x: xPosition, y: yPosition };
164
168
  const isAllowedToSwipe = isDeltaInDirection(delta, ctx.direction.current, swipeStartThreshold);
165
169
  if (isAllowedToSwipe) {
170
+ // Prevent scrollable content from scrolling while dragging the drawer
171
+ if (ctx.isDragging) {
172
+ e.preventDefault();
173
+ }
166
174
  ctx.onDrag(syntheticEvent);
167
175
  // Prevent parent drawer from receiving the touch drag event
168
176
  if (ctx.nested.current) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johly/vaul-svelte",
3
- "version": "1.0.0-next.12",
3
+ "version": "1.0.0-next.13",
4
4
  "license": "MIT",
5
5
  "repository": "github:johanohly/vaul-svelte",
6
6
  "exports": {