huntabyte / vaul-svelte

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

Bug: Triggering the Drawer right after closing it causes it to open and close immediately #3

Closed basokant closed 8 months ago

basokant commented 8 months ago

https://github.com/huntabyte/vaul-svelte/assets/70033855/61edf2e0-93e6-4305-8068-f9380a1e6647

This bug was observed on both Chrome and Safari.

code406 commented 8 months ago

Similar experience in Chrome for Android. Tapping the button right after closing the dialog makes it not trigger the dialog.

https://github.com/huntabyte/vaul-svelte/assets/36109227/8427714c-7d19-4205-80d1-2d1b09fbde02

(Hope you can see the touch indicator, it's white over a white background...)

basokant commented 8 months ago

This was fixed in https://github.com/huntabyte/vaul-svelte/commit/c55703ea3841a34acb6d97e67154d87aafeb0c98. See below demo:

https://github.com/huntabyte/vaul-svelte/assets/70033855/b9e676a9-4ea5-4167-8cf7-0d2642806890

basokant commented 8 months ago

Similar experience in Chrome for Android. Tapping the button right after closing the dialog makes it not trigger the dialog.

screen-20231231-020250.2.mp4 (Hope you can see the touch indicator, it's white over a white background...)

@code406 I believe this is desired behaviour, you shouldn't be able to reopen it that quickly, which is why the button doesn't work. Before it was quickly opening and closing