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

Controlled usage of Dialog does not respect default of preventScroll: true #423

Closed
mcmxcdev opened this issue Mar 26, 2024 · 1 comment · May be fixed by #469
Closed

Controlled usage of Dialog does not respect default of preventScroll: true #423

mcmxcdev opened this issue Mar 26, 2024 · 1 comment · May be fixed by #469

Comments

@mcmxcdev
Copy link

Describe the bug

We use the controlled usage of https://www.bits-ui.com/docs/components/dialog exactly like on the documentation and noticed that the whole page is still scrollable while the dialog is open.

I was able to find out that it is due to empty <Dialog.Trigger />, if using e.g. <Dialog.Trigger>foo</Dialog.Trigger> and clicking it, preventScroll works as expected.

Reproduction

Logs

No response

System Info

System:
    OS: Linux 6.5 Ubuntu 23.10 23.10 (Mantic Minotaur)
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    Memory: 13.64 GB / 30.71 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.volta/tools/image/node/20.11.0/bin/node
    Yarn: 1.22.22 - ~/.volta/tools/image/yarn/1.22.22/bin/yarn
    npm: 10.2.4 - ~/.volta/tools/image/node/20.11.0/bin/npm
    pnpm: 8.14.1 - ~/.volta/tools/image/pnpm/8.14.1/bin/pnpm
  Browsers:
    Brave Browser: 123.1.64.109
    Chrome: 123.0.6312.58
  npmPackages:
    @sveltejs/kit: ^2.5.3 => 2.5.3 
    bits-ui: ^0.21.1 => 0.21.1 
    svelte: ^4.2.9 => 4.2.12

Severity

annoyance

@huntabyte huntabyte mentioned this issue Jun 9, 2024
4 tasks
@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
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants