{"action":"created","issue":{"url":"https://api.github.com/repos/algolia/autocomplete.js/issues/100","repository_url":"https://api.github.com/repos/algolia/autocomplete.js","labels_url":"https://api.github.com/repos/algolia/autocomplete.js/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/algolia/autocomplete.js/issues/100/comments","events_url":"https://api.github.com/repos/algolia/autocomplete.js/issues/100/events","html_url":"https://github.com/algolia/autocomplete.js/issues/100","id":167948690,"number":100,"title":"Visual indication for autoselect","user":{"login":"legshooter","id":5124919,"avatar_url":"https://avatars.githubusercontent.com/u/5124919?v=3","gravatar_id":"","url":"https://api.github.com/users/legshooter","html_url":"https://github.com/legshooter","followers_url":"https://api.github.com/users/legshooter/followers","following_url":"https://api.github.com/users/legshooter/following{/other_user}","gists_url":"https://api.github.com/users/legshooter/gists{/gist_id}","starred_url":"https://api.github.com/users/legshooter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legshooter/subscriptions","organizations_url":"https://api.github.com/users/legshooter/orgs","repos_url":"https://api.github.com/users/legshooter/repos","events_url":"https://api.github.com/users/legshooter/events{/privacy}","received_events_url":"https://api.github.com/users/legshooter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/algolia/autocomplete.js/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/algolia/autocomplete.js/labels/pull%20request%20welcomed","name":"pull request welcomed","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-27T20:28:36Z","updated_at":"2016-09-02T13:23:28Z","closed_at":"2016-09-02T13:23:28Z","body":"Hey,\r\n\r\nCurrently, all `autoselect` does is select the first `suggestion` when the user hits the `enter` button. I think the more natural behaviour would be to also \"auto-cursor\" it, because then the outcome is actually expected.\r\n\r\nI found myself doing:\r\n```javascript\r\n.on('autocomplete:shown', function (event) {\r\n    $(event.target)\r\n        .closest('.algolia-autocomplete')\r\n        .find('.aa-suggestion')\r\n        .first()\r\n        .addClass('aa-cursor');\r\n})\r\n```\r\n\r\nWhich ironically makes `autoselect` redundant, since even when disabled, the above code makes it autoselect. I'm guessing this is due to mutual reliance on `.aa-cursor`.\r\n\r\nApart of this redundancy, it just makes sense UI-wise, since right now `autoselect` looks _visually_ the same, whether enabled or disabled."},"comment":{"url":"https://api.github.com/repos/algolia/autocomplete.js/issues/comments/244373372","html_url":"https://github.com/algolia/autocomplete.js/issues/100#issuecomment-244373372","issue_url":"https://api.github.com/repos/algolia/autocomplete.js/issues/100","id":244373372,"user":{"login":"legshooter","id":5124919,"avatar_url":"https://avatars.githubusercontent.com/u/5124919?v=3","gravatar_id":"","url":"https://api.github.com/users/legshooter","html_url":"https://github.com/legshooter","followers_url":"https://api.github.com/users/legshooter/followers","following_url":"https://api.github.com/users/legshooter/following{/other_user}","gists_url":"https://api.github.com/users/legshooter/gists{/gist_id}","starred_url":"https://api.github.com/users/legshooter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legshooter/subscriptions","organizations_url":"https://api.github.com/users/legshooter/orgs","repos_url":"https://api.github.com/users/legshooter/repos","events_url":"https://api.github.com/users/legshooter/events{/privacy}","received_events_url":"https://api.github.com/users/legshooter/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T13:23:28Z","updated_at":"2016-09-02T13:23:28Z","body":"Merged and looks good. Thanks everyone, closing now."}}
{"actor":{"display_login":"legshooter"}}