{"action":"created","issue":{"url":"https://api.github.com/repos/yabwe/medium-editor/issues/757","labels_url":"https://api.github.com/repos/yabwe/medium-editor/issues/757/labels{/name}","comments_url":"https://api.github.com/repos/yabwe/medium-editor/issues/757/comments","events_url":"https://api.github.com/repos/yabwe/medium-editor/issues/757/events","html_url":"https://github.com/yabwe/medium-editor/issues/757","id":98679431,"number":757,"title":"Buggy restore selection when creating link on first word in paragraph","user":{"login":"Olgagr","id":1297219,"avatar_url":"https://avatars.githubusercontent.com/u/1297219?v=3","gravatar_id":"","url":"https://api.github.com/users/Olgagr","html_url":"https://github.com/Olgagr","followers_url":"https://api.github.com/users/Olgagr/followers","following_url":"https://api.github.com/users/Olgagr/following{/other_user}","gists_url":"https://api.github.com/users/Olgagr/gists{/gist_id}","starred_url":"https://api.github.com/users/Olgagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Olgagr/subscriptions","organizations_url":"https://api.github.com/users/Olgagr/orgs","repos_url":"https://api.github.com/users/Olgagr/repos","events_url":"https://api.github.com/users/Olgagr/events{/privacy}","received_events_url":"https://api.github.com/users/Olgagr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yabwe/medium-editor/labels/bug","name":"bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-03T06:18:41Z","updated_at":"2015-08-11T13:43:18Z","closed_at":"2015-08-10T20:59:59Z","body":"Steps to reproduce: \r\n\r\n1. Create a new paragraph\r\n2. Select first word in paragraph\r\n3. Create a link\r\n4. this.base.restoreSelection() doesn't restore selection on link correctly (what is visually seen). MediumEditor.selection.getSelectionStart(this.base.options.ownerDocument) returns previous paragraph, not anchor node from current paragraph. It is problematic when you want to apply custom class on link or, in my case, add custom data attributes to link.\r\n\r\n![mediumeditor___demo](https://cloud.githubusercontent.com/assets/1297219/9031800/37a8c590-39b8-11e5-831e-4c7b3856d87b.png)\r\n"},"comment":{"url":"https://api.github.com/repos/yabwe/medium-editor/issues/comments/129877636","html_url":"https://github.com/yabwe/medium-editor/issues/757#issuecomment-129877636","issue_url":"https://api.github.com/repos/yabwe/medium-editor/issues/757","id":129877636,"user":{"login":"Olgagr","id":1297219,"avatar_url":"https://avatars.githubusercontent.com/u/1297219?v=3","gravatar_id":"","url":"https://api.github.com/users/Olgagr","html_url":"https://github.com/Olgagr","followers_url":"https://api.github.com/users/Olgagr/followers","following_url":"https://api.github.com/users/Olgagr/following{/other_user}","gists_url":"https://api.github.com/users/Olgagr/gists{/gist_id}","starred_url":"https://api.github.com/users/Olgagr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Olgagr/subscriptions","organizations_url":"https://api.github.com/users/Olgagr/orgs","repos_url":"https://api.github.com/users/Olgagr/repos","events_url":"https://api.github.com/users/Olgagr/events{/privacy}","received_events_url":"https://api.github.com/users/Olgagr/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T13:43:18Z","updated_at":"2015-08-11T13:43:18Z","body":"@nmielnik I can confirm it works for 4.12.8. Thank you!"}}