Skip to content
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

Fix #118: Preserve the current page number and zoom level on reload. #121

Merged
merged 1 commit into from
Dec 14, 2021
Merged

Fix #118: Preserve the current page number and zoom level on reload. #121

merged 1 commit into from
Dec 14, 2021

Conversation

zamzterz
Copy link
Contributor

@zamzterz zamzterz commented Dec 6, 2021

This is a suggestion for a fix of #118.
It doesn't preserve the exact scroll location, only the page number, which will cause a jump to the top of the page on reload.
But I still think it's an improvement compared to jumping back to the start of the document on each reload.

The underlying pdf.js already supports this automatically, but it relies on detecting the page was reloaded which I couldn't find any way of achieving when pdf.js is embedded in vscode like this.

@tomoki1207
Copy link
Owner

LGTM, Thanks!

@tomoki1207 tomoki1207 merged commit 3eb12b4 into tomoki1207:master Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants