tinro
tinro copied to clipboard
Maintain previous scroll position when navigating back
When I navigate to a new route and then back, it would be nice if the page was at my previous scroll position so that I don't have to scroll down from the top.
I saw your note Back and forward cause remounting of corresponding components so scroll position always be on the top.
from https://github.com/AlexxNB/tinro/issues/3#issuecomment-620520511. I tried the scroll restoration polyfill and it isn't working for me. Would love to see tinro support this instead of hacking together something on my end that I'm sure wouldn't be as good of a solution. :)
Browser leave the scroll position if your elements render rapidly. But other case you should restore scroll yourself. I don't want implement this feature in tinro, because it is not universal.