Page A: very long page (e.g.: terms and conditions)
Page B: very long page (e.g.: privacy policy)
You’re in the end of page A, and you click an internal link to go to page B. The scroll position of page A is maintained instead of getting to the top, so the user has to manually scroll up.
When navigating between different pages, scroll should not be preserved (maybe add an exception for when the current link is equal to the next link, excluding different GET parameters)
I have never seen this as a bug to be honest. The idea is that the page is not loading. So it should preserve the state.
So we have browser1.scrollYTo(0) added to all our links. It does the job.
A use case for us to NOT scroll the page is when changing the language, we load another URL internally, and it just shows the new language’s data keeping the user in the same position.
If this is changed to scroll to top on each internal navigation, I would need some logic to keep the user in the same place for some cases.
Well, in that case, I suggest the Wappler team to add a configurable option to the main layout to select if it should scroll up by default or not, because I’m not sure if I like the idea of adding a scroll-to-top code on every link