Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: block swipe if in wrong direction #314

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

joaom00
Copy link
Contributor

@joaom00 joaom00 commented Mar 31, 2024

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

vaul-before.mp4

After

vaul-after.mp4

Copy link

vercel bot commented Mar 31, 2024

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

A member of the Team first needs to authorize it.

@joaom00 joaom00 changed the title block swipe if in wrong direction fix: block swipe if in wrong direction Mar 31, 2024
@emilkowalski emilkowalski merged commit 10187c9 into emilkowalski:main Apr 6, 2024
1 of 2 checks passed
@joaom00 joaom00 deleted the fix/text-selection branch April 6, 2024 16:58
@franzwilhelm
Copy link

@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
Copy link

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text inside drawer component is not draggable for copying
4 participants