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
While navigating the application and using the browser feature to go back the application will navigate to a completely previous page when trying to go home (/). This happens only after you go to the page in a tab that had some previous page opened.
To replicate the issue in my example open the app and do:
Open new tab and go to any page. After that manually put the app address to the address bar and navigate to it.
Navigate with menu to PageA
Navigate with menu to PageB
Use browser go back (can be button, keyboard shortcut or mouse button)
Navigate with menu to PageB again
Try navigating Home with menu
You will get redirected to a previous page from step 0
…11833)
**Motivation**
Fix for #11832
Before going to negative history index check if the history will return
anything for that index. If that's not the case the previous behavior
would open previously opened page from that tab.
**Test plan**
From my testing project you can test it by
To replicate the issue in my example open the app and do:
1. Open new tab and go to any page. After that manually put the app
address to the address bar and navigate to it.
2. Navigate with menu to PageA
3. Navigate with menu to PageB
4. Use browser go back (can be button, keyboard shortcut or mouse
button)
5. Navigate with menu to PageB again
6. Try navigating Home with menu
7. You will no longer get redirected to a previous page from step 0 but
to the home page instead
…11833)
**Motivation**
Fix for #11832
Before going to negative history index check if the history will return
anything for that index. If that's not the case the previous behavior
would open previously opened page from that tab.
**Test plan**
From my testing project you can test it by
To replicate the issue in my example open the app and do:
1. Open new tab and go to any page. After that manually put the app
address to the address bar and navigate to it.
2. Navigate with menu to PageA
3. Navigate with menu to PageB
4. Use browser go back (can be button, keyboard shortcut or mouse
button)
5. Navigate with menu to PageB again
6. Try navigating Home with menu
7. You will no longer get redirected to a previous page from step 0 but
to the home page instead
Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.
Current behavior
While navigating the application and using the browser feature to go back the application will navigate to a completely previous page when trying to go home (/). This happens only after you go to the page in a tab that had some previous page opened.
To replicate the issue in my example open the app and do:
Video showcasing the bug https://www.youtube.com/watch?v=tMXZSsK7_28
Expected behavior
Going to / after navigating the page and using back browser feature should open the home page instead of navigating entirely to the previous page.
Reproduction
https://github.com/SlickDomique/navigation-history-bug-react-navigation6
Platform
Packages
Environment
The text was updated successfully, but these errors were encountered: