-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Description
Describe the bug
When you in a remote form does not call submit in the enhance function pending_count is never reset
{myForm.pending}
<form {...myForm.enhance(async ({data, submit}) => {
// don't submit for whatever reason could be a confirm step
})}>
<!-- ... -->
</form>If you do this pending will be incremented and never go down.
The issue is here
Pending is incremented on line 116 when handle_submit is called on line 160 the callback is invoked. but pending only decrement within the submit function, so if the callback returns without calling submit it never is.
try {
await callback({
form,
data,
submit: () => submit(form_data)
});
} catch (e) {
const error = e instanceof HttpError ? e.body : { message: /** @type {any} */ (e).message };
const status = e instanceof HttpError ? e.status : 500;
void set_nearest_error_page(error, status);
}Reproduction
Easier to explain in code above.
Logs
System Info
System:
OS: macOS 26.3
CPU: (10) arm64 Apple M1 Pro
Memory: 737.97 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.13.0 - /Users/hald/.nvm/versions/node/v24.13.0/bin/node
npm: 11.6.2 - /Users/hald/.nvm/versions/node/v24.13.0/bin/npm
Browsers:
Chrome: 145.0.7632.160
Edge: 145.0.3800.97
Firefox: 137.0.2
Safari: 26.3
npmPackages:
@sveltejs/adapter-vercel: ^6.3.0 => 6.3.3
@sveltejs/kit: ^2.53.2 => 2.53.2
@sveltejs/vite-plugin-svelte: ^6.1.1 => 6.2.1
svelte: ^5.53.7 => 5.53.7
vite: ^7.3.0 => 7.3.0Severity
annoyance
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels