Skip to content

fix: abort navigation after async rendering if obsolete#15811

Merged
dummdidumm merged 2 commits into
mainfrom
abort-nav-fix
May 7, 2026
Merged

fix: abort navigation after async rendering if obsolete#15811
dummdidumm merged 2 commits into
mainfrom
abort-nav-fix

Conversation

@dummdidumm

Copy link
Copy Markdown
Member

With async Svelte, rendering itself can take a bit, and during that time a new navigation could occur. We therefore have to check the navigation token once more. We also should only update the props.page once - the duplicative and now-deleted code was pre-$app/state and kept around without reason, now being wasteful at best and causing buggy rerenders at worst. Helps with the redirect test not failing anymore against latest Svelte.

With async Svelte, rendering itself can take a bit, and during that time a new navigation could occur. We therefore have to check the navigation token once more.
We also should only update the props.page once - the duplicative and now-deleted code was pre-`$app/state` and kept around without reason, now being wasteful at best and causing buggy rerenders at worst.
Helps with the redirect test not failing anymore against latest Svelte.
@changeset-bot

changeset-bot Bot commented May 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b744b4f

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit 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

@svelte-docs-bot

Copy link
Copy Markdown

Comment thread packages/kit/src/runtime/client/client.js
Comment thread packages/kit/src/runtime/client/client.js Outdated
@dummdidumm dummdidumm merged commit ea0b9a7 into main May 7, 2026
49 of 50 checks passed
@dummdidumm dummdidumm deleted the abort-nav-fix branch May 7, 2026 19:03
@github-actions github-actions Bot mentioned this pull request May 7, 2026
Rich-Harris pushed a commit that referenced this pull request May 14, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @sveltejs/kit@2.60.0

### Minor Changes

- feat: allow 'submit' and 'hidden' form fields to accept numbers and
booleans ([#15802](#15802))


- feat: warn on unread `form` remote function validation issues
([#15653](#15653))

### Patch Changes

- fix: abort navigation after async rendering if obsolete
([#15811](#15811))


- fix: skip refreshing queries on full-page reload form submissions
([#15803](#15803))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants