emilkowalski / vaul

An unstyled drawer component for React.
https://vaul.emilkowal.ski
MIT License
5.27k stars 170 forks source link

fix: block swipe if in wrong direction #314

Closed joaom00 closed 2 months ago

joaom00 commented 3 months ago

Fixes #295

This PR blocks the swipe if the user starts swiping in the wrong direction allowing the user to select text within the vaul. Unfortunately this fix will only work for pointers. It was not possible to fix it for mobile because I realized that the problem comes from the react-remove-scroll lib that Radix uses under the hood to block scrolling.

Also forwards some events from the DialogPrimitive.Content props

Before

https://github.com/emilkowalski/vaul/assets/48808846/62a062b7-579f-4e54-93ed-7235f423f788

After

https://github.com/emilkowalski/vaul/assets/48808846/1e54e09a-dba3-4011-9a9e-49a1f42b23c6

vercel[bot] commented 3 months ago

@joaom00 is attempting to deploy a commit to the emil Team on Vercel.

A member of the Team first needs to authorize it.

franzwilhelm commented 2 months ago

@emilkowalski I see this is merged to main, but not deployed to npm. Right now this is blocking people in my production app using vaul from copying text. Do I need to fork vaul and deploy it myself, or is a release right around the corner?

franzwilhelm commented 2 months ago

@emilkowalski I'll be fine with a canary/beta release candidate so I can use it before you deploy a minor/patch release

gustavo-maurina commented 2 months ago

Any scheduled date set for this to be deployed to npm?