sveltejs / svelte

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

Fix: bind:scroll resets scroll state #11469

Closed Black1358 closed 1 week ago

Black1358 commented 2 weeks ago

This is simply fix to the issue #11468; When initial state for $state() === undefined || null bind:scroll don't set window.scroll to 0;

Svelte 5 rewrite

Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (main).

If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is svelte-4 and not main.

Before submitting the PR, please make sure you do the following

Tests and linting

closed #11468

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 3d5ad649cd379ee2dc8328054ab4ad295f60a481

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------ | ----- | | svelte | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Rich-Harris commented 1 week ago

thank you!