-
-
Notifications
You must be signed in to change notification settings - Fork 200
Manual scroll restoration from history state #936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # src/utils/index.ts
|
Size Change: +894 B (+3.82%) Total Size: 24.3 kB
|
Playwright test resultsDetails
|
|
Note to self: make scroll handler passive. |
|
Another note: Check if this breaks scroll position restoration if using |
|
@hirasso Right! We'll probably need to check this together on a call, the resolve-url logic is still a bit mysterious to me 🙃 |
|
@hirasso I think this one is ready for review :) Could you check in one of your projects using |
|
Closing in favor of implementing this in the Scroll Plugin for advanced use cases. |
|
Tracked in #84 |
Most routing libraries currently store the scroll position in the history state and manually restore it from there.
Advantages
Prior art
Description
scroll:storewhen saving position,scroll:restorewhen restoring positionscrollfunction to update position when scrolling stopsTo-do
Checks
masterbranchnpm run lint)npm run test)