A drawer component for React.
fix: drawer stuck when changing a <select> option on Desktop Safari (#487)
Emil Kowalskib5f77deebf1c
diff --git a/src/index.tsx b/src/index.tsxindex ebcc34a..5f13161 100644--- a/src/index.tsx+++ b/src/index.tsx@@ -282,6 +282,11 @@ export function Root({const swipeAmount = drawerRef.current ? getTranslate(drawerRef.current, direction) : null;const date = new Date();+ // Fixes https://github.com/emilkowalski/vaul/issues/483+ if (element.tagName === 'SELECT') {+ return false;+ }+if (element.hasAttribute('data-vaul-no-drag') || element.closest('[data-vaul-no-drag]')) {return false;}