Skip to content

Parallel routes do not clear slot with [...catchAll] #48719

@Yukioru

Description

@Yukioru

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/A

Which 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

  1. Click "To /overview" page
  2. Slot displays correctly with contents of the "Overview Extension"
  3. Click "To /demo" page
  4. The slot has not cleared

image

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

NEXT-1394

Metadata

Metadata

Assignees

No one assigned

    Labels

    Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.bugIssue was opened via the bug report template.linear: nextConfirmed issue that is tracked by the Next.js team.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions