Describe the bug
The TL;DR is that adding a hidden input to a RadioGroup or Select (maybe other components too but I haven't tested) causes the whole page to scroll if certain conditions are met.
I've created a repro to avoid over-explaining the conditions.
The workaround is simple (to wrap the Root element in a relative div), but it was extremely hard to pinpoint where this issue was coming from in a real life app.
Reproduction
https://github.com/marcnajera/bits-ui-scroll-bug.git
Logs
System Info
System:
OS: macOS 26.2
CPU: (8) arm64 Apple M3
Memory: 99.25 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.13.1 - /Users/marc/.nvm/versions/node/v24.13.1/bin/node
npm: 11.8.0 - /Users/marc/.nvm/versions/node/v24.13.1/bin/npm
pnpm: 10.10.0 - /opt/homebrew/bin/pnpm
Deno: 2.6.9 - /opt/homebrew/bin/deno
Browsers:
Safari: 26.2
npmPackages:
@sveltejs/kit: ^2.50.2 => 2.55.0
bits-ui: ^2.16.3 => 2.16.3
svelte: ^5.51.0 => 5.53.12
Severity
annoyance
Describe the bug
The TL;DR is that adding a hidden input to a RadioGroup or Select (maybe other components too but I haven't tested) causes the whole page to scroll if certain conditions are met.
I've created a repro to avoid over-explaining the conditions.
The workaround is simple (to wrap the Root element in a relative div), but it was extremely hard to pinpoint where this issue was coming from in a real life app.
Reproduction
https://github.com/marcnajera/bits-ui-scroll-bug.git
Logs
System Info
System: OS: macOS 26.2 CPU: (8) arm64 Apple M3 Memory: 99.25 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.13.1 - /Users/marc/.nvm/versions/node/v24.13.1/bin/node npm: 11.8.0 - /Users/marc/.nvm/versions/node/v24.13.1/bin/npm pnpm: 10.10.0 - /opt/homebrew/bin/pnpm Deno: 2.6.9 - /opt/homebrew/bin/deno Browsers: Safari: 26.2 npmPackages: @sveltejs/kit: ^2.50.2 => 2.55.0 bits-ui: ^2.16.3 => 2.16.3 svelte: ^5.51.0 => 5.53.12Severity
annoyance