{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/selection-api/issues/53","repository_url":"https://api.github.com/repos/w3c/selection-api","labels_url":"https://api.github.com/repos/w3c/selection-api/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/w3c/selection-api/issues/53/comments","events_url":"https://api.github.com/repos/w3c/selection-api/issues/53/events","html_url":"https://github.com/w3c/selection-api/issues/53","id":101094502,"number":53,"title":"Selection events for text controls","user":{"login":"ehsan","id":168508,"avatar_url":"https://avatars.githubusercontent.com/u/168508?v=3","gravatar_id":"","url":"https://api.github.com/users/ehsan","html_url":"https://github.com/ehsan","followers_url":"https://api.github.com/users/ehsan/followers","following_url":"https://api.github.com/users/ehsan/following{/other_user}","gists_url":"https://api.github.com/users/ehsan/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsan/subscriptions","organizations_url":"https://api.github.com/users/ehsan/orgs","repos_url":"https://api.github.com/users/ehsan/repos","events_url":"https://api.github.com/users/ehsan/events{/privacy}","received_events_url":"https://api.github.com/users/ehsan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/selection-api/labels/Compatibility","name":"Compatibility","color":"e99695"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2015-08-14T20:11:15Z","updated_at":"2016-09-29T17:09:03Z","closed_at":null,"body":"The current spec doesn't explain what needs to happen for `input` and `textarea` elements when the selection inside them changes.  Those selections are not associated with the `Selection` object for a `Document`, so we need to handle them somehow.\r\n\r\nI think a nice way to extend the current spec to cover this case would be to dispatch `selectstart` and `selectionchange` to the `input` or `textarea` element itself when the selection inside them changes.  The reason why the `selectionchange` event needs to be dispatched to the element and not the `Document` is that the web page would otherwise be unable to detect which selection has changed."},"comment":{"url":"https://api.github.com/repos/w3c/selection-api/issues/comments/250530033","html_url":"https://github.com/w3c/selection-api/issues/53#issuecomment-250530033","issue_url":"https://api.github.com/repos/w3c/selection-api/issues/53","id":250530033,"user":{"login":"rniwa","id":285965,"avatar_url":"https://avatars.githubusercontent.com/u/285965?v=3","gravatar_id":"","url":"https://api.github.com/users/rniwa","html_url":"https://github.com/rniwa","followers_url":"https://api.github.com/users/rniwa/followers","following_url":"https://api.github.com/users/rniwa/following{/other_user}","gists_url":"https://api.github.com/users/rniwa/gists{/gist_id}","starred_url":"https://api.github.com/users/rniwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rniwa/subscriptions","organizations_url":"https://api.github.com/users/rniwa/orgs","repos_url":"https://api.github.com/users/rniwa/repos","events_url":"https://api.github.com/users/rniwa/events{/privacy}","received_events_url":"https://api.github.com/users/rniwa/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T17:09:03Z","updated_at":"2016-09-29T17:09:03Z","body":"> I understand what's said, but it's also strange that `selectionchange` fires but `window.getSelection()` doesn't change. I don't know which is more prudent.\r\n\r\nThat is already true when call `setSelectionRange` on the input element.  The whole thing about selection in a text control is quite a bit messy but I think there are compelling use cases for wanting to know when the selection changes inside a `input` element or a `textarea` element, and firing `selectionchange` event in those elements DO address them."}}
{"actor":{"display_login":"rniwa"}}