Skip to content

Commit

Permalink
fix: drawer stuck when changing a <select> option on Desktop Safari (#…
Browse files Browse the repository at this point in the history
…487)

* Fix drawer stuck on select

* Remove unnecessary test page
  • Loading branch information
emilkowalski authored Oct 13, 2024
1 parent 56fc33f commit b5f77de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b5f77de

Please sign in to comment.