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]: Router is blocking navigation through URL change without useBlock/usePrompt on 6.7.0 #9968

Closed
adagit94 opened this issue Jan 24, 2023 · 1 comment
Labels

Comments

@adagit94
Copy link

What version of React Router are you using?

6.7.0

Steps to Reproduce

  1. Load app using HashRouter.
  2. Change URL to some different route inside of the app
  3. Check console for warning about attempt to block transition
    nav-block-warn

Expected Behavior

Route transition should be allowed.

Actual Behavior

Even after commenting useBeforeUnload hook and onpopstate handler for actually blocking transition outside of app and change of history back through use of navigate() func in case of onpopstat (without any useBlock or usePrompt), router still reports attempts to block route transition when URL is changed manually to route inside of the app as can be seen in print screen. I think thats problem related to new added hooks for blocking navigation. We dont manipulate history stack directly outside of builtin functions in react-router-dom (navigate()).
nav-block-warn

@adagit94 adagit94 added the bug label Jan 24, 2023
@timdorr
Copy link
Member

timdorr commented Jan 24, 2023

Duplicate of #9966.

That issue defines the problem a little better, so I'm going to close this out in favor of that issue.

@timdorr timdorr closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants