Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Maintain previous scroll position when navigating back #92

Open
jamauro opened this issue Sep 16, 2021 · 1 comment
Open

Maintain previous scroll position when navigating back #92

jamauro opened this issue Sep 16, 2021 · 1 comment

Comments

@jamauro
Copy link

jamauro commented Sep 16, 2021

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 #3 (comment). 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. :)

@AlexxNB
Copy link
Owner

AlexxNB commented Nov 12, 2021

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants