-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Open
Labels
Description
Reproduction
https://stackblitz.com/edit/github-nucwwnaj?file=app%2Froutes%2Fhome.tsx
- Submit a form whose action redirects to a third party (e.g. Shopify checkout).
- Press the back button to return to the page with the form.
System Info
System:
OS: Linux 6.8 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
CPU: (4) x64 AMD EPYC 7763 64-Core Processor
Memory: 10.39 GB / 15.62 GB
Container: Yes
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.13.0 - /home/ubuntu/.volta/tools/image/node/24.13.0/bin/node
Yarn: 4.12.0 - /home/ubuntu/.volta/tools/image/yarn/4.12.0/bin/yarn
npm: 11.6.2 - /home/ubuntu/.volta/tools/image/node/24.13.0/bin/npm
pnpm: 10.28.2 - /home/ubuntu/.volta/tools/image/pnpm/10.28.2/bin/pnpm
npmPackages:
@react-router/cloudflare: catalog: => 7.12.0
@react-router/dev: catalog: => 7.12.0
react-router: catalog: => 7.12.0
vite: catalog: => 8.0.0-beta.8Used Package Manager
pnpm
Expected Behavior
navigation.state === "idle"
Actual Behavior
navigation.state === "submitting"
As a result, if you disable a "buy now" or "start checkout" button based on navigation.state to guard against submitting twice, then if the user returns to the page with the back button, the button stays disabled.