{"action":"created","issue":{"url":"https://api.github.com/repos/atom/markdown-preview/issues/458","repository_url":"https://api.github.com/repos/atom/markdown-preview","labels_url":"https://api.github.com/repos/atom/markdown-preview/issues/458/labels{/name}","comments_url":"https://api.github.com/repos/atom/markdown-preview/issues/458/comments","events_url":"https://api.github.com/repos/atom/markdown-preview/issues/458/events","html_url":"https://github.com/atom/markdown-preview/pull/458","id":197459510,"number":458,"title":"Fix scroll position when re-rendering markdown preview pane","user":{"login":"divyenduz","id":746482,"avatar_url":"https://avatars3.githubusercontent.com/u/746482?v=4","gravatar_id":"","url":"https://api.github.com/users/divyenduz","html_url":"https://github.com/divyenduz","followers_url":"https://api.github.com/users/divyenduz/followers","following_url":"https://api.github.com/users/divyenduz/following{/other_user}","gists_url":"https://api.github.com/users/divyenduz/gists{/gist_id}","starred_url":"https://api.github.com/users/divyenduz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divyenduz/subscriptions","organizations_url":"https://api.github.com/users/divyenduz/orgs","repos_url":"https://api.github.com/users/divyenduz/repos","events_url":"https://api.github.com/users/divyenduz/events{/privacy}","received_events_url":"https://api.github.com/users/divyenduz/received_events","type":"User","site_admin":false},"labels":[{"id":193725999,"url":"https://api.github.com/repos/atom/markdown-preview/labels/needs-review","name":"needs-review","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-24T11:29:13Z","updated_at":"2018-03-21T09:49:03Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/atom/markdown-preview/pulls/458","html_url":"https://github.com/atom/markdown-preview/pull/458","diff_url":"https://github.com/atom/markdown-preview/pull/458.diff","patch_url":"https://github.com/atom/markdown-preview/pull/458.patch"},"body":"### Requirements\r\n\r\n* Any changes in mardown re-renders the markdown preview but does not preserve the scroll position. This PR aims to fix https://github.com/atom/markdown-preview/issues/24 and https://github.com/atom/markdown-preview/issues/370\r\n\r\n### Description of the Change\r\n\r\nThis change involves finding the scrollTop position of editor element in which markdown is being edited and use that position to set scrollTop position on the markdown preview element.\r\n\r\n## Alternate Designs\r\n\r\nI also considered implementation like https://github.com/atom/markdown-preview/issues/370#issuecomment-268963044 but I think such a solution is over complicated and difficult to test. While the solution of this PR solves it for simple markdowns, I think it caters the 80%-20% principle and is a step forward. \r\n\r\n### Benefits\r\n\r\nResolves https://github.com/atom/markdown-preview/issues/24 and https://github.com/atom/markdown-preview/issues/370\r\n\r\n### Possible Drawbacks\r\n\r\nDoes not solve 100% use case of the original issues. \r\n\r\n### Applicable Issues\r\n\r\nhttps://github.com/atom/markdown-preview/issues/24\r\nhttps://github.com/atom/markdown-preview/issues/370\r\n"},"comment":{"url":"https://api.github.com/repos/atom/markdown-preview/issues/comments/374882326","html_url":"https://github.com/atom/markdown-preview/pull/458#issuecomment-374882326","issue_url":"https://api.github.com/repos/atom/markdown-preview/issues/458","id":374882326,"user":{"login":"divyenduz","id":746482,"avatar_url":"https://avatars3.githubusercontent.com/u/746482?v=4","gravatar_id":"","url":"https://api.github.com/users/divyenduz","html_url":"https://github.com/divyenduz","followers_url":"https://api.github.com/users/divyenduz/followers","following_url":"https://api.github.com/users/divyenduz/following{/other_user}","gists_url":"https://api.github.com/users/divyenduz/gists{/gist_id}","starred_url":"https://api.github.com/users/divyenduz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divyenduz/subscriptions","organizations_url":"https://api.github.com/users/divyenduz/orgs","repos_url":"https://api.github.com/users/divyenduz/repos","events_url":"https://api.github.com/users/divyenduz/events{/privacy}","received_events_url":"https://api.github.com/users/divyenduz/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T09:49:03Z","updated_at":"2018-03-21T09:49:03Z","author_association":"NONE","body":"@50Wliu: Any update on this one? I think this is resolver [here](https://github.com/atom/markdown-preview/issues/525) or at some other place. \r\n\r\nCan you comment and close this PR if required? \r\n\r\nThanks! "}}
{"actor":{"display_login":"divyenduz"}}