Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog outTransition, outTransitionConfig causes data-melt-scroll-lock not to be destroyed #556

Closed
syedkhairi opened this issue May 29, 2024 · 1 comment · May be fixed by #469
Closed
Labels
bug Something isn't working Svelte 5 Roadmap This issue is planned to be addressed or fixed when the library migrates to Svelte 5.

Comments

@syedkhairi
Copy link

syedkhairi commented May 29, 2024

Describe the bug

When preventScroll={true}, I noticed the component adds data-melt-scroll-lock with style="overflow: hidden; padding-right: calc(0px);". However, when I have all transitions functions and configs (see reproduction), the overflow: hidden and data-melt-scroll-lock remains when dialog is closed, so I can't scroll the body anymore.

Without inTransition, inTransitionConfig, outTransition, and outTransitionConfig, when closed, the data-melt-scroll-lock is destroyed.

In my repro example below I uses shallow routing to open the dialog, but I'll try to whip up another simple example - but I still believe it would behave the same.

Reproduction

https://stackblitz.com/edit/github-3ug31a?file=src%2Flib%2FDialog.svelte

Logs

No response

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/kit: ^2.0.0 => 2.5.10 
    bits-ui: latest => 0.21.10 
    svelte: ^4.2.7 => 4.2.17

Severity

annoyance

@syedkhairi syedkhairi changed the title Dialog transitions causes data-melt-scroll-lock not to be destroyed Dialog outTransition, outTransitionConfig causes data-melt-scroll-lock not to be destroyed May 29, 2024
@huntabyte huntabyte mentioned this issue Jun 9, 2024
3 tasks
@huntabyte huntabyte added bug Something isn't working Svelte 5 Roadmap This issue is planned to be addressed or fixed when the library migrates to Svelte 5. labels Jul 12, 2024
@huntabyte huntabyte mentioned this issue Jul 31, 2024
70 tasks
@huntabyte
Copy link
Owner

Closing as fixed in bits-ui@next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Svelte 5 Roadmap This issue is planned to be addressed or fixed when the library migrates to Svelte 5.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants