Skip to content
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]: <Form> navigation doesn't respect basename #9347

Closed
janovekj opened this issue Sep 26, 2022 · 2 comments · Fixed by #9352
Closed

[Bug]: <Form> navigation doesn't respect basename #9347

janovekj opened this issue Sep 26, 2022 · 2 comments · Fixed by #9352
Labels

Comments

@janovekj
Copy link

What version of React Router are you using?

6.4

Steps to Reproduce

CodeSandbox

Navigate to /basename/some-path in the sandbox browser window and click the submit button. This will trigger a navigation.

Expected Behavior

I would have expected the basename part of the URL to be preserved, and to stay at /basename/some-path

Actual Behavior

/basename is not preserved, app navigates to /some-path instead. To get the desired behavior, I must use the full URL to stay at the current route: <Form action="/basepath/some-path>

@brophdawg11
Copy link
Contributor

Thanks for the bug report @janovekj! I just merged the fix for this - planning to get a prerelease out today and a stable 6.4.2 next week 👍

@janovekj
Copy link
Author

Awesome, @brophdawg11! Super impressed with the speed at which this was fixed — thanks. I'll make sure to check out the prerelease!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants