Skip to content

Make data-vaul-no-drag work if any parent matches#267

Merged
emilkowalski merged 1 commit into
emilkowalski:mainfrom
arsaizdihar:main
Feb 11, 2024
Merged

Make data-vaul-no-drag work if any parent matches#267
emilkowalski merged 1 commit into
emilkowalski:mainfrom
arsaizdihar:main

Conversation

@arsaizdihar

Copy link
Copy Markdown
Contributor

Currently, data-vaul-no-drag only worked if the dragged element is exactly the element that has the attribute. The expected behavior is it works if any of the parent (using element.closest) has the attribute. Fixes #266

@vercel

vercel Bot commented Feb 11, 2024

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@emilkowalski emilkowalski merged commit b7d7640 into emilkowalski:main Feb 11, 2024
@Poylar

Poylar commented Apr 9, 2024

Copy link
Copy Markdown

this still not working with Inputs fields

@kemaly99

kemaly99 commented Jun 5, 2024

Copy link
Copy Markdown

Can someone please provide an example on how to use this attribute

@arsaizdihar

Copy link
Copy Markdown
Contributor Author

Can someone please provide an example on how to use this attribute

You just need to add attribute data-vaul-no-drag to any element in the drawer and any drag on that element (and every children of it, recursively) wont move the drawer

@rodxotwod

rodxotwod commented Feb 27, 2025

Copy link
Copy Markdown

I did everything what you suggested @arsaizdihar but I can still drag the drawer, any ideas? thanks!

@HIuNTT

HIuNTT commented Jun 23, 2025

Copy link
Copy Markdown

I did everything what you suggested @arsaizdihar but I can still drag the drawer, any ideas? thanks!

I did as @arsaizdihar said and it worked

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.

How to create an undraggable drawer

6 participants