-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023
Binaries:
Node: 19.7.0
npm: 9.5.0
Yarn: N/A
pnpm: 8.8.0
Relevant Packages:
next: 13.5.4-canary.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: N/A
Next.js Config:
output: N/AWhich area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue
https://github.com/Yukioru/next-parallel-routes-bug
https://codesandbox.io/p/github/Yukioru/next-parallel-routes-bug/main
https://next-parallel-routes-bug.vercel.app
To Reproduce
You have to use soft navigation
- Click "To /overview" page
- Slot displays correctly with contents of the "Overview Extension"
- Click "To /demo" page
- The slot has not cleared
Describe the Bug
Once the slot is shown, it is not cleared if the URL does not match.
A similar bug has already been described in Issue: #48124, but the solution with [...catchAll] route did not help. The route is not called.
If you do a hard navigation, you will see that the /demo slot segment corresponds to the default.js route, but it does not show up.
Expected Behavior
Using soft navigation (next/link) the slot should be cleared by the [...catchAll] route (or the default.js route if possible).
Which browser are you using? (if relevant)
Chrome 112.0.5615.138
How are you deploying your application? (if relevant)
Vercel, CodeSandbox
