-
Notifications
You must be signed in to change notification settings - Fork 36
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
Perform back from browser, but onConfirm didn't perform back #2
Comments
No, that was not a typo. I originally used pop, but due to issues with that I went to push. You can read more in my commit message here: af559d2 If user has this in their history:
and right click on back arrow and clicks on /2/paths/ago, then pop() would take them to /1/path/ago instead of /2/paths/ago |
We cannot know the correct history entry to pop to without using memory history (https://github.com/ReactTraining/history#properties).
ie, supporting pop would require a version of |
I have i little bit similar issue, i try to perform back, but onConfirm do nothing in that case. PS: I use hash navigation. |
I'm using this library inside a PWA. Generally in mobile browsers tapping back button rewinds the history to the point when there are no previous entries and then the page tab/ PWA is closed. The problem with adding new history entry after tapping back button is user is not able to exit the PWA (think close page tab) with back button app. |
ty for reporting this, @piotr-cz . please make a PR fixing this if you can! |
Can you elaborate on your commit message We cannot know the correct history entry to pop to without using memory history ? |
Proposed fix for ZacharyRSmith#2
Everybody, please test and comment on #30 |
Re: "We cannot know the correct history entry to pop to without using memory history" -- Here is an example: If user has this in their history: /1/path/ago and right click on back arrow and clicks on /2/paths/ago, then pop() would take them to /1/path/ago instead of /2/paths/ago I think supporting pop would require a version of that uses memory history |
Proposed fix for ZacharyRSmith#2
Back button should work now (as some of us expect it to), when using new |
I'm trying to perform action back via browser navigation and
<NavigationPrompt/>
triggered.But when I click button that have
onClick={onConfirm}
, it not actually back, but it's forwarded.I expected the program run
history.goBack()
do you have any solution for this?
could you create props when able to check backward or forward action?
my code:
are you do typo in this part?
The text was updated successfully, but these errors were encountered: