You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click go to nonexistent route - notice the page hasn't changed
Hit refresh for a hard-navigation - notice 404 gets rendered
Current vs. Expected behavior
Current
Adding a catch-all route into a slot to handle closing modals (as per the docs) breaks soft navigation to non-existent pages - Next just happily swallows the navigation, and keeps rendering the previous page.
NOTE: Hard navigation works as expected - renders a not found page.
Expected
If nothing - consistent behaviour between soft and hard navigation.
Ideally - either update docs with the correct approach of closing modals or fix the soft navigation.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 18.18.2
npm: 9.8.1
Yarn: 1.22.22
pnpm: 9.9.0
Relevant Packages:
next: 15.1.6 // Latest available version is detected (15.1.6).
eslint-config-next: 15.1.3
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.3
Next.js Config:
output: standalone
Which area(s) are affected? (Select all that apply)
Parallel & Intercepting Routes
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Other (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered:
ljuborados
changed the title
Using the recommended approach from docs to handle modals breaks client-side not found handling
Using the recommended approach from docs to handle modals breaks soft navigation 404 handling
Jan 24, 2025
ljuborados
changed the title
Using the recommended approach from docs to handle modals breaks soft navigation 404 handling
Docs’ recommended modal handling approach interferes with soft navigation 404 behavior
Jan 24, 2025
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/amazing-tharp-23mwdj
To Reproduce
Current vs. Expected behavior
Current
Adding a catch-all route into a slot to handle closing modals (as per the docs) breaks soft navigation to non-existent pages - Next just happily swallows the navigation, and keeps rendering the previous page.
NOTE: Hard navigation works as expected - renders a not found page.
Expected
If nothing - consistent behaviour between soft and hard navigation.
Ideally - either update docs with the correct approach of closing modals or fix the soft navigation.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 Available memory (MB): 32768 Available CPU cores: 10 Binaries: Node: 18.18.2 npm: 9.8.1 Yarn: 1.22.22 pnpm: 9.9.0 Relevant Packages: next: 15.1.6 // Latest available version is detected (15.1.6). eslint-config-next: 15.1.3 react: 19.0.0 react-dom: 19.0.0 typescript: 5.7.3 Next.js Config: output: standalone
Which area(s) are affected? (Select all that apply)
Parallel & Intercepting Routes
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Other (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: