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

Content shift in Dialog component #1046

Closed
wojexe opened this issue Apr 25, 2024 · 5 comments · May be fixed by #1182
Closed

Content shift in Dialog component #1046

wojexe opened this issue Apr 25, 2024 · 5 comments · May be fixed by #1182

Comments

@wojexe
Copy link

wojexe commented Apr 25, 2024

Describe the bug

There is a bug with content being shifted when a Dialog component is inside of a flex container with the gap property and has Content specified. This error occurs briefly when the page is loaded (and possibly hydrated) to later disappear and behave as expected.

Reproduction

https://stackblitz.com/edit/github-hxkj5f?file=src%2Froutes%2F%2Bpage.svelte

reproduction.mov

Logs

No response

System Info

INB4 - I have used these packages in my project, but in the reproduction above, I've used Svelte 4 and the issue persists

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 127.20 MB / 16.00 GB
    Shell: 3.7.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 21.6.2 - ~/.asdf/installs/nodejs/21.6.2/bin/node
    npm: 10.2.4 - ~/.asdf/plugins/nodejs/shims/npm
    pnpm: 7.1.0 - ~/.asdf/shims/pnpm
    bun: 1.1.1 - ~/.asdf/installs/bun/1.1.1/bin/bun
  Browsers:
    Chrome: 124.0.6367.78
    Safari: 17.4.1
  npmPackages:
    @sveltejs/kit: ^2.5.0 => 2.5.6
    bits-ui: ^0.21.1 => 0.21.3
    formsnap: ^1.0.0 => 1.0.0
    mode-watcher: ^0.3.0 => 0.3.0
    svelte: ^5.0.0-next.94 => 5.0.0-next.106
    svelte-radix: ^1.1.0 => 1.1.0
    sveltekit-superforms: ^2.12.2 => 2.12.5

Severity

annoyance

@jakebennett18505
Copy link

Did you manage to find a fix for this?
The more dialogs I add, the worse it gets 🙈

@wojexe
Copy link
Author

wojexe commented Aug 25, 2024

@jakebennett18505 Unfortunately no :(

@huntabyte huntabyte mentioned this issue Sep 28, 2024
3 tasks
@jamesepirus
Copy link

jamesepirus commented Oct 16, 2024

I have this issue as well, did anyone find a temporary workaround?

@huntabyte
Copy link
Owner

It's mostly unavoidable in the current implementation. It is fixed in the Svelte 5 version coming soon though.

@huntabyte
Copy link
Owner

Fixed in @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.

4 participants