-
-
Notifications
You must be signed in to change notification settings - Fork 434
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
[2.x] Take over scroll restoration from browser #2051
base: master
Are you sure you want to change the base?
Conversation
This PR also separates out scroll data in the history state, preventing it from being encrypted with the rest of the payload as it is not sensitive data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't have a chance to test this or even read all the changes thoroughly, but in principle I'm on board with this approach! 💪
This PR switches the browser's scroll restoration into manual mode, taking the process over from the browser.
We're doing this primarily because of history encryption, as the process is async and we don't know how long it will take, we can then manually restore the document's scroll position whenever decryption has finished.