From b0744f8aae68ebd9224ffe2c88c12e960d3074d7 Mon Sep 17 00:00:00 2001 From: arsaizdihar Date: Sun, 11 Feb 2024 09:18:48 +0700 Subject: [PATCH] fix: make data-vaul-no-drag work if any parent matches --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 52aa659..8406306 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -159,7 +159,7 @@ function Root({ const swipeAmount = drawerRef.current ? getTranslate(drawerRef.current, direction) : null; const date = new Date(); - if (element.hasAttribute('data-vaul-no-drag')) { + if (element.hasAttribute('data-vaul-no-drag') || element.closest('[data-vaul-no-drag]')) { return false; }