-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[Bug]: Relative path's on splat routes are broken #11038
Comments
Yes, I think it's wrong as well. When you select For splat routes at the root, the route path would be Also, I would say that If you want let u = new URL('d', 'http://localhost/a/b/c')
// u.pathname = '/a/b/d'
let u = new URL('d', 'http://localhost/a/b/c/')
// u.pathname = '/a/b/c/d' |
@kiliman thanks for confirming! About the trailing slash. Not sure if that's ideal because most websites do not use a trailing slash and this would change the behavior of the |
I can confirm as well. All our apps are "broken" (active tab is not displaying active anymore). This is a breaking change and should then be flagged as a major update. |
This looks like a bug related to both #10983 and #11006 - we'll get a fix in for this 👍. I think we just need the change from #10983 in a second code path.
Interestingly enough, this was an issue in prior versions without
This is not quite accurate. |
This is fixed in #11045 and will be available in the next release |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of React Router are you using?
6.19.0
Steps to Reproduce
Create a route with a relative="path" option in a splat route that either goes forward, or backward. Non splat routes are working fine.
Expected Behavior
The navigation should respect the relative path
Actual Behavior
It goes back to the root.
Let's say you are on page
/a/b/c
and you link tod
usingrelative="path"
it goes to/d
instead of/a/b/c/d
Reproduction in Remix: https://stackblitz.com/edit/remix-run-remix-jb8sq2?file=app%2Froutes%2F%24.tsx
I'm guessing it has something to do with the latest change, because if I revert back to an earlier version of Remix there is no issue.
The text was updated successfully, but these errors were encountered: