huntabyte / vaul-svelte

An unstyled drawer component for Svelte.
https://vaul-svelte.com
MIT License
437 stars 18 forks source link

Support `[data-vaul-no-drag]` to prevent dragging on specific elements #63

Closed didier closed 6 months ago

didier commented 7 months ago

Describe the feature in detail (code, mocks, or screenshots encouraged)

The React version of Vaul recently added support to disable dragging on specific elements. I'm currently experiencing issues with drag on inputs - when I drag and release above an input, the input gets focused and the scroll does a jagged snap.

[data-vaul-no-drag]: When interacting with an element with this data attribute, the drawer won't be dragged. https://arc.net/l/quote/fvdgmtwh

What type of pull request would this be?

New Feature

Provide relevant links or additional information.

https://arc.net/l/quote/fvdgmtwh https://github.com/emilkowalski/vaul#root

shyakadavis commented 7 months ago

Salut;

Found something that could resolve this; let me see if I can submit a P.R for it in a few. 🙂