ITADN

Hidden input causes scroll issues

#1987Closedmarcnajera 创建于 2026-03-17
bug
M
marcnajeracommented
### 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 ```bash ``` ### System Info ```bash 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
关闭于 2026-04-05 1 条评论