Can't block history back/forward with confirmLeave
Closed this issue · 2 comments
ekfn commented
Hello! I'm trying to use confirmLeave
to block navigation and it works perfectly for link/program navigation, but if I use back/forward browser button then address bar url and browser state changes before confirmation. But I stay on page that needed confirmation and redux has intended state though.
Am I missing something or what should I use in this case?
ekfn commented
As I understand there is no way to prevent location change from back/forward buttons. It could restore previous location when history is blocked and I press cancel, but it doesn't.
ekfn commented
as it turned out it doesn't restore previous location only if you reload page before back/forward navigation. It's definitely not about redux-first-router, so I close issue.