sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
76.8k stars 3.98k forks source link

"bind:scrollY" scrolls page to X or 0 after mounting #11468

Closed Black1358 closed 1 week ago

Black1358 commented 2 weeks ago

Describe the bug

render_effect in blind_window_scroll don't checks when value undefined

Reproduction

Just use bind:scrollY={SY} with let SY = $state() / $state(0) / $state(500)

Logs

No response

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i3-4030U CPU @ 1.90GHz
    Memory: 765.21 MB / 7.90 GB
  Binaries:
    Node: 20.11.1 
    npm: 10.6.0 
  Browsers:
    Chrome: master_preferences
    Edge: Chromium (123.0.2420.97)
  npmPackages:
    svelte: 5.0.0-next.123 => 5.0.0-next.123

Severity

annoyance