{"action":"created","issue":{"url":"https://api.github.com/repos/webscopeio/react-textarea-autocomplete/issues/97","repository_url":"https://api.github.com/repos/webscopeio/react-textarea-autocomplete","labels_url":"https://api.github.com/repos/webscopeio/react-textarea-autocomplete/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/webscopeio/react-textarea-autocomplete/issues/97/comments","events_url":"https://api.github.com/repos/webscopeio/react-textarea-autocomplete/issues/97/events","html_url":"https://github.com/webscopeio/react-textarea-autocomplete/pull/97","id":378169963,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4OTM4MjAx","number":97,"title":"Fix scroll position for chrome","user":{"login":"superandrew213","id":13059204,"node_id":"MDQ6VXNlcjEzMDU5MjA0","avatar_url":"https://avatars3.githubusercontent.com/u/13059204?v=4","gravatar_id":"","url":"https://api.github.com/users/superandrew213","html_url":"https://github.com/superandrew213","followers_url":"https://api.github.com/users/superandrew213/followers","following_url":"https://api.github.com/users/superandrew213/following{/other_user}","gists_url":"https://api.github.com/users/superandrew213/gists{/gist_id}","starred_url":"https://api.github.com/users/superandrew213/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superandrew213/subscriptions","organizations_url":"https://api.github.com/users/superandrew213/orgs","repos_url":"https://api.github.com/users/superandrew213/repos","events_url":"https://api.github.com/users/superandrew213/events{/privacy}","received_events_url":"https://api.github.com/users/superandrew213/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-07T07:24:18Z","updated_at":"2018-11-07T22:34:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/webscopeio/react-textarea-autocomplete/pulls/97","html_url":"https://github.com/webscopeio/react-textarea-autocomplete/pull/97","diff_url":"https://github.com/webscopeio/react-textarea-autocomplete/pull/97.diff","patch_url":"https://github.com/webscopeio/react-textarea-autocomplete/pull/97.patch"},"body":"Chrome does not maintain scroll position after item is selected. \r\n\r\n**To replicate:**\r\nOn chrome browser go [here](https://codepen.io/jukben/pen/bYZqvR) and enter a couple of lines of text. Scroll to top and add :smile.\r\n\r\n**Solution**\r\nJust save scroll position before and apply it after caret position has been set.\r\n\r\n2 other solutions have been suggested here: https://stackoverflow.com/questions/7464282/javascript-scroll-to-selection-after-using-textarea-setselectionrange-in-chrome\r\n\r\nI coudn't get them to work properly. One doesn't work with line breaks and the other one doesn't scroll to the exact same position user was before they selected one of the items."},"comment":{"url":"https://api.github.com/repos/webscopeio/react-textarea-autocomplete/issues/comments/436802745","html_url":"https://github.com/webscopeio/react-textarea-autocomplete/pull/97#issuecomment-436802745","issue_url":"https://api.github.com/repos/webscopeio/react-textarea-autocomplete/issues/97","id":436802745,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjgwMjc0NQ==","user":{"login":"superandrew213","id":13059204,"node_id":"MDQ6VXNlcjEzMDU5MjA0","avatar_url":"https://avatars3.githubusercontent.com/u/13059204?v=4","gravatar_id":"","url":"https://api.github.com/users/superandrew213","html_url":"https://github.com/superandrew213","followers_url":"https://api.github.com/users/superandrew213/followers","following_url":"https://api.github.com/users/superandrew213/following{/other_user}","gists_url":"https://api.github.com/users/superandrew213/gists{/gist_id}","starred_url":"https://api.github.com/users/superandrew213/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superandrew213/subscriptions","organizations_url":"https://api.github.com/users/superandrew213/orgs","repos_url":"https://api.github.com/users/superandrew213/repos","events_url":"https://api.github.com/users/superandrew213/events{/privacy}","received_events_url":"https://api.github.com/users/superandrew213/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T22:34:05Z","updated_at":"2018-11-07T22:34:05Z","author_association":"NONE","body":"This is on Chrome (macos 70.0.3538.77). Works fine on Safari and Firefox.\r\n\r\n![screenrecording](https://user-images.githubusercontent.com/13059204/48165304-e681c600-e330-11e8-8c63-a282dc3a219d.gif)\r\n"}}
{"actor":{"display_login":"superandrew213"}}