Describe the bug
If a form has an action to another route and you use enhance as per doc it doesn't automatically navigate to the new route.
But from the doc it seems like using applyAction should apply the default browser behavior.
This doesn't seem to be the case: the action gets called but the routing doesn't happen.
Reproduction
- Go to https://www.sveltelab.dev/j9dffhs0vu1rqub
- Try to submit the form
- Observe that the navigation doesn't happen
- Try to remove the use:enhance
- Submit the form
- Observe that the browser correctly redirect there
Logs
No response
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880 H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 16.14.2 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 7.17.0 - /usr/local/bin/npm npmPackages: @sveltejs/adapter-auto: "2.0.0 => 2.1.
0
@sveltejs/kit: "1.5.0 => 1.18.0 svelte: "3.54.0 => 3.59.1 vite: "4.1.4 => 4.3.8
Severity
serious, but I can work around it
Additional Information
To be clear this is only present when the action return a success, not when it return a redirect
Describe the bug
If a form has an action to another route and you use enhance as per doc it doesn't automatically navigate to the new route.
But from the doc it seems like using
applyActionshould apply the default browser behavior.This doesn't seem to be the case: the action gets called but the routing doesn't happen.
Reproduction
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
To be clear this is only present when the action return a success, not when it return a redirect