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

Preserve page scroll when closing browser #212

Open
RangerMauve opened this issue Nov 8, 2022 · 0 comments
Open

Preserve page scroll when closing browser #212

RangerMauve opened this issue Nov 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@RangerMauve
Copy link
Member

At the moment, Agregore will save the page URL and placement when closing the browser (and periodically during running to recover from crashes), but it doesn't preserve the scroll offset.

This can be annoying when you lose your place in a large blog post or something similar.

The easiest way would be to get the first scroll offset using JS and get a selector for the element then save the offset and element selector in the JSON along with the URL and positioning. Then on reload, we can wait for load and inject some JS that would set the scroll height.

Alternately we could just use the scroll from the HTML or Body elements and ignore more complex use cases.

@RangerMauve RangerMauve added the enhancement New feature or request label Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant