Broken browser back button behavior
See original GitHub issueStore updates from history.listen break browser back behavior, causing user to ping-pong between 2 routes.
Steps to reproduce:
- User visits
/home
->/hello
->/counter
- On
/counter
, clicks browser back and lands on/hello
- On
/hello
clicks browser back
Expected behavior: lands on /home
Actual behavior: lands on /counter
GIF Illustration:
Branch that reproduces issue is available here: https://github.com/kswin/connected-react-router/tree/poc/broken-browser-back
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:6
Top Results From Across the Web
FIX: Back Button Not Working in Web Browser?
Usually, the Back button in a browser fails to function correctly due to reasons such as redirecting links and conflicting browser extensions.
Read more >[WEB] browser back button handling is broken #10263 - GitHub
Current behavior. Whenever the initial screen is reached, the rest of the history gets wiped out. Eg. when you navigate to:
Read more >Browser Back Button not working on Windows PC
Browser Back Button not working on Windows PC · 1] Clear the browser cache · 2] Skip the redirecting addresses · 3] Disable...
Read more >Broken product links after pressing the browser back button
In the shop of @flexes when he clicked on a product on the homepage, then hit the back button, the browser redirected him...
Read more >Troubleshooting Browser Back Button Not Working
Fix: The Back Button Doesn't Work · 1. Disable your extensions/ add-ons · 2. Clear your cache · 3. Reset or reinstall your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is this going to be fixed? still an issue, even without time travel
Well, I did fork this project and made
time travel
optional. That was the bit of code that caused the bug -> https://github.com/kswin/connected-react-routerFor the exact code change to the source see
src/ConnectedRouter.js
in PR https://github.com/kswin/connected-react-router/pull/3/filesIt’s a long PR, but that’s because most files are just the distribution