You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Link}from"react-router-dom";import{ScrollRestoration}from"react-router-dom";exportdefaultfunctionApp(){return(<><ScrollRestoration/><divclassName="App"><Linkto="/#hello%2520%20world">
MUST WORK AND SCROLL TO BOTTOM, BUT WORKS ONLY WITH JS DISABLED OR ON
REFRESH. CLICK ME AND REFRESH.
</Link><divstyle={{height: "3000px"}}></div><Linkid={"hello%20 world"}>Link</Link></div></>);}
With disabled js first links work, and scrolls to bottom. With refresh too.
With enabled js not.
We just published version 6.14.2-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!
What version of React Router are you using?
6.10.0
Steps to Reproduce
Example app.
https://codesandbox.io/s/crimson-cdn-n3gpdq?file=/src/App.js
Create broserRouter and following route
With disabled js first links work, and scrolls to bottom. With refresh too.
With enabled js not.
The issue is here
react-router/packages/react-router-dom/index.tsx
Line 1300 in bc25528
Must be
decodeURIComponent(location.hash.slice(1))
Expected Behavior
Should work even with js enabled
Actual Behavior
Work only if js disabled.
The text was updated successfully, but these errors were encountered: