huntabyte / vaul-svelte

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

background: black inline style added to body but not cleaned up #56

Closed khromov closed 5 months ago

khromov commented 5 months ago

Describe the bug

See repro below. The demo site has an overlay div that makes this problem not visible but in my app the background suddenly turns black after opening the modal.

https://github.com/huntabyte/vaul-svelte/assets/1207507/59cba726-f62d-4309-842b-1fe9dadb7375

Reproduction

  1. Go to https://www.vaul-svelte.com/
  2. Open web inspector, check body, no inline styles present
  3. Open Drawer, close drawer
  4. Body now has background: black; inline style

Logs

No response

System Info

-

Severity

annoyance

shyakadavis commented 5 months ago

Hi;

Found a fix for this. Will send a P.R in a few. 🙂

khromov commented 5 months ago

Much appreciated!

shyakadavis commented 5 months ago

Btw, @khromov I love your blog and snippets sites. Had not checked on them for a while, though. Let me see what new stuff you got there. 🙂