Slider breaks if rendered while hidden
bug
### Describe the bug
When a slider is inside an accordion which is closed when it is rendered, the calculation of the Thumb position does not work correctly, because `getBoundingClientRect` returns all zeroes.
When the page loads, slider 1 is open, 2 and 3 are closed:
<img width="547" height="342" alt="Image" src="https://github.com/user-attachments/assets/313940fd-c967-4f36-b9bd-4d5d94424e53" />
-> All three are rendered, but only slider 1 is visible
When Slider 2 or 3 are opened, they don't render correctly:
<img width="707" height="565" alt="Image" src="https://github.com/user-attachments/assets/e4888cc1-2305-4e21-891d-1503774636d1" />
### Reproduction
https://stackblitz.com/edit/2g9hayau?file=src%2Froutes%2F%2Bpage.svelte
### Severity
annoyance
关闭于 2026-04-05 0 条评论