Navigating back to the previous page is currently done by simply calling the native window history like so:
<TopNavBar on:back={() => history.back()} />
While this works in most cases, there are special scenarios:
when the user successfully updates the profile name, they are programmatically redirected to a different page using goto(). The user then clicks "back" on that other page and is being taken back to changing their profile name. This is unexpected and not desired.
A possible solution is to remove the last entry from the history (using a wrapper around replaceState() or similar) when programmatically redirecting the user. It is unclear if there's a generic solution to this that solves the problem for all cases, or if one would have to handle it for each case of goto() redirects individually.
Hardware Specification
No response
Steps to Reproduce the Bug
Settings > My profile > Profile name > Update
Tap the arrow left in the top navigation bar
You're being taken back to the profile name update page (not expected)
Expected Behaviour
Being redirected back to the page you visited before opening settings
Description
Navigating back to the previous page is currently done by simply calling the native window history like so:
While this works in most cases, there are special scenarios:
goto()
. The user then clicks "back" on that other page and is being taken back to changing their profile name. This is unexpected and not desired.A possible solution is to remove the last entry from the history (using a wrapper around
replaceState()
or similar) when programmatically redirecting the user. It is unclear if there's a generic solution to this that solves the problem for all cases, or if one would have to handle it for each case ofgoto()
redirects individually.Hardware Specification
No response
Steps to Reproduce the Bug
Settings > My profile > Profile name > Update
Expected Behaviour
Being redirected back to the page you visited before opening settings
Actual Behaviour
see above
Errors
n/a