-
Notifications
You must be signed in to change notification settings - Fork 26.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The example from the documentation doesn't work. Link + [...catchAll] does not close modal window #65099
Comments
Hi @MrOxMasTer -- does the modal close for you if you add a I can see how the docs are a bit unclear here, so I'll get those updated. |
I deleted page.tsx to check, but it was there before and also didn't work on 14.2.3. |
I read your comment about this and about the suggestion to support [[...catchAll]] in special routes and so also tried your way but it doesn't work still |
I tried your provided reproduction and it works fine if I add a CleanShot.2024-04-26.at.14.05.12.mp4Please provide an updated reproduction for us to look into this for you. Thanks! |
So, I deleted the .next folder and ran it again and it worked! Then let me ask you another question. Do I understand correctly that in this situation it can only lead to the home page? It seems logical, because the link is to the main page, but maybe somehow it can be realised by intercepts? Because when testing on other pages, it doesn't return to the main page all the time. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Link to the code that reproduces this issue
https://github.com/hqw567/nextgram
To Reproduce
Current vs. Expected behavior
Current Behavior:
When navigating away from an Intercepting Route using router.push('/') or <Link href={'/'}>, the Intercepting Route's component does not unmount or close, leaving the Intercepting Route's state or UI still active or visible in the background.
Expected Behavior:
Upon navigating away from an Intercepting Route using either router.push('/') or a <Link href={'/'}>, the Intercepting Route's component should unmount and close properly, similar to how it behaves when using router.back(). This ensures a consistent and predictable navigation experience within Next.js applications.
Provide environment information
Which area(s) are affected? (Select all that apply)
Parallel & Intercepting Routes
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
#62430
https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#closing-the-modal
It's exactly the same situation. The modal window does not close.
The text was updated successfully, but these errors were encountered: