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
Description
When navigating in a page, a user will scroll looking for information.
When he finds and click a link, the user will open a new page (that he expects that will open in the top of the page as implemented here #31)
But, when clicking on back button (navigator back button or a provided back button from the application), the user expects to return to the place he has scrolled before.
There's currently no functionality for remembering scroll positions in history. Scroll lock has a different purpose. It prevents the whole page from scrolling to the top, which you sometimes need if you're navigating nested pages below the fold.
Hum, understood. What is a good workaround? I'm thinking in save the current position in a store with BeforeURLChange and set it with AfterPageLoad, or is better to use afterNavigate?
I think that the browser keep the scroll position, at least in native HTML it does, if we could just turn off the scroll to Top, maybe it works. Or, at least, if it's possible to implement a goBack function that don't call scroll to Top, but I don't know if it's possible to know if the user clicked on the Back button of the web browser.
Hum, understood. What is a good workaround? I'm thinking in save the current position in a store with BeforeURLChange and set it with AfterPageLoad, or is better to use afterNavigate?
Those sound like good ideas. Couldn't tell which is best of the last two, maybe the former.
I think I would also need to implement the desired behavior that @ferulisses describes here.
I'm migrating an app to Svelte from Vue + Vue-Router and it has this available through its scroll options.
I wonder is it something that could be achieved through the new plugin architecture in Routify 3?
Description
When navigating in a page, a user will scroll looking for information.
When he finds and click a link, the user will open a new page (that he expects that will open in the top of the page as implemented here #31)
But, when clicking on back button (navigator back button or a provided back button from the application), the user expects to return to the place he has scrolled before.
Reproduce
https://example.routify.dev/example/widget
Fixes tried
Stop Scroll reset in nested routes #86 (comment)
Stop Scroll reset in nested routes #86 (comment)
Other Info
The text was updated successfully, but these errors were encountered: