{"action":"created","issue":{"url":"https://api.github.com/repos/Pitmairen/selection-search/issues/16","labels_url":"https://api.github.com/repos/Pitmairen/selection-search/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/Pitmairen/selection-search/issues/16/comments","events_url":"https://api.github.com/repos/Pitmairen/selection-search/issues/16/events","html_url":"https://github.com/Pitmairen/selection-search/pull/16","id":109388818,"number":16,"title":"Treat selections in \"contenteditable\" elements like those in input and textarea elements","user":{"login":"bijancamp","id":8800015,"avatar_url":"https://avatars.githubusercontent.com/u/8800015?v=3","gravatar_id":"","url":"https://api.github.com/users/bijancamp","html_url":"https://github.com/bijancamp","followers_url":"https://api.github.com/users/bijancamp/followers","following_url":"https://api.github.com/users/bijancamp/following{/other_user}","gists_url":"https://api.github.com/users/bijancamp/gists{/gist_id}","starred_url":"https://api.github.com/users/bijancamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bijancamp/subscriptions","organizations_url":"https://api.github.com/users/bijancamp/orgs","repos_url":"https://api.github.com/users/bijancamp/repos","events_url":"https://api.github.com/users/bijancamp/events{/privacy}","received_events_url":"https://api.github.com/users/bijancamp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-01T21:26:32Z","updated_at":"2015-10-02T06:35:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Pitmairen/selection-search/pulls/16","html_url":"https://github.com/Pitmairen/selection-search/pull/16","diff_url":"https://github.com/Pitmairen/selection-search/pull/16.diff","patch_url":"https://github.com/Pitmairen/selection-search/pull/16.patch"},"body":"Hi Per! I came across an edge case that I thought could be handled by this change.\r\n\r\nCurrently, when text is selected in certain rich-text areas (elements that have the \"contenteditable\" attribute set to true), Selection Search acts as if the selection is not in an editable region. Specifically, if the Auto activator is being used, the popup button is shown automatically when text is selected in these elements. Here is an example of selecting text in such a region on [twitter.com](https://twitter.com/):\r\n\r\n![illustration of selection search in contenteditable elements](https://cloud.githubusercontent.com/assets/8800015/10235714/90eb230c-6864-11e5-9b91-295b2d576502.gif)\r\n\r\nSimilar behavior occurs when using the \"Mouse Click\" activator.\r\n\r\nThis behavior can be an issue when double clicking or triple clicking text inside one of these regions: the popup button (if using the Auto activator) or menu (if using the Mouse Click activator) will automatically open, making it easier for the user to accidentally click a search engine. This change makes selections in contenteditable elements act the same as selections in input or textarea elements. :)\r\n\r\nI am still a newbie JS developer, so I hope this change makes sense. Please let me know if you would like me to make some more changes. :)"},"comment":{"url":"https://api.github.com/repos/Pitmairen/selection-search/issues/comments/144936061","html_url":"https://github.com/Pitmairen/selection-search/pull/16#issuecomment-144936061","issue_url":"https://api.github.com/repos/Pitmairen/selection-search/issues/16","id":144936061,"user":{"login":"Pitmairen","id":357032,"avatar_url":"https://avatars.githubusercontent.com/u/357032?v=3","gravatar_id":"","url":"https://api.github.com/users/Pitmairen","html_url":"https://github.com/Pitmairen","followers_url":"https://api.github.com/users/Pitmairen/followers","following_url":"https://api.github.com/users/Pitmairen/following{/other_user}","gists_url":"https://api.github.com/users/Pitmairen/gists{/gist_id}","starred_url":"https://api.github.com/users/Pitmairen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pitmairen/subscriptions","organizations_url":"https://api.github.com/users/Pitmairen/orgs","repos_url":"https://api.github.com/users/Pitmairen/repos","events_url":"https://api.github.com/users/Pitmairen/events{/privacy}","received_events_url":"https://api.github.com/users/Pitmairen/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T06:35:46Z","updated_at":"2015-10-02T06:35:46Z","body":"Hi, thank you. This is probably the correct behavior to make it consistent with other input/textarea.\r\n\r\nI have merged your pull request, but I did some cleanup on the history to remove unnecessary commits to keep the log clean. Only the last commit which did the real change was kept. "}}