Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

restore scrollTop of viewElement for smoother livereload #477

Merged
merged 2 commits into from
Sep 28, 2017

Conversation

dsumer
Copy link
Contributor

@dsumer dsumer commented Mar 24, 2017

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

When the PreviewView is reloaded after a change, the scrollTop is being reset to 0, which is quite annoying when writing a Markdown file while the view is scrolled to the current position.

With this Change the scrollTop will be restored after rerendering the PreviewView.

Alternate Designs

Benefits

Smoother rerendering of the PreviewView with livereload.
Resolves #370

Possible Drawbacks

Applicable Issues

#370

@maxbrunsfeld
Copy link
Contributor

@dsumer Nice work, really sorry for how long it took for us to look at it.

@maxbrunsfeld maxbrunsfeld merged commit 2834853 into atom:master Sep 28, 2017
@maxbrunsfeld
Copy link
Contributor

This will go out in Atom 1.22.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When the preview page refreshed,it won't scroll to the correct place.thanks~
3 participants