{"action":"created","issue":{"url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1332","labels_url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1332/labels{/name}","comments_url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1332/comments","events_url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1332/events","html_url":"https://github.com/mgcrea/angular-strap/pull/1332","id":51029819,"number":1332,"title":"Typeahead refactor select mode and model update","user":{"login":"vmlf01","id":4786750,"avatar_url":"https://avatars.githubusercontent.com/u/4786750?v=3","gravatar_id":"","url":"https://api.github.com/users/vmlf01","html_url":"https://github.com/vmlf01","followers_url":"https://api.github.com/users/vmlf01/followers","following_url":"https://api.github.com/users/vmlf01/following{/other_user}","gists_url":"https://api.github.com/users/vmlf01/gists{/gist_id}","starred_url":"https://api.github.com/users/vmlf01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmlf01/subscriptions","organizations_url":"https://api.github.com/users/vmlf01/orgs","repos_url":"https://api.github.com/users/vmlf01/repos","events_url":"https://api.github.com/users/vmlf01/events{/privacy}","received_events_url":"https://api.github.com/users/vmlf01/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mgcrea/angular-strap/labels/directive-typeahead","name":"directive-typeahead","color":"444444"},{"url":"https://api.github.com/repos/mgcrea/angular-strap/labels/enhancement","name":"enhancement","color":"009800"},{"url":"https://api.github.com/repos/mgcrea/angular-strap/labels/needs-work","name":"needs-work","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-12-04T21:13:50Z","updated_at":"2015-08-10T20:25:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mgcrea/angular-strap/pulls/1332","html_url":"https://github.com/mgcrea/angular-strap/pull/1332","diff_url":"https://github.com/mgcrea/angular-strap/pull/1332.diff","patch_url":"https://github.com/mgcrea/angular-strap/pull/1332.patch"},"body":"Added some more tests and fixes on top of @ruifortes PR #1310, but still have some problems when testing in docs pages:\r\n\r\n- Selecting item with ENTER key doesn't update ngModel bindings\r\n- Icon input (minLength = 0) doesn't show options dropdown until you type something, then it will behave as expected\r\n- In Firefox, when selecting an icon with the mouse the ngModel will be set to the item, but then pressing tab or clicking outside, the ngModel will be updated again with the input text (there were already some previous issue reports related to this: #652, #1011)\r\n- In Angular 1.2, when using selectMode, the input will be ng-valid even when a value has not been selected (ngModel = undefined), causing 1 test to fail.\r\n\r\nThis is weird because the tests will pass, but it clearly show the problems using the docs pages. Except for the last one, I wasn't able to make the tests fail to reproduce these issues. Need help to fix them :("},"comment":{"url":"https://api.github.com/repos/mgcrea/angular-strap/issues/comments/129596110","html_url":"https://github.com/mgcrea/angular-strap/pull/1332#issuecomment-129596110","issue_url":"https://api.github.com/repos/mgcrea/angular-strap/issues/1332","id":129596110,"user":{"login":"ansonkao","id":300092,"avatar_url":"https://avatars.githubusercontent.com/u/300092?v=3","gravatar_id":"","url":"https://api.github.com/users/ansonkao","html_url":"https://github.com/ansonkao","followers_url":"https://api.github.com/users/ansonkao/followers","following_url":"https://api.github.com/users/ansonkao/following{/other_user}","gists_url":"https://api.github.com/users/ansonkao/gists{/gist_id}","starred_url":"https://api.github.com/users/ansonkao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansonkao/subscriptions","organizations_url":"https://api.github.com/users/ansonkao/orgs","repos_url":"https://api.github.com/users/ansonkao/repos","events_url":"https://api.github.com/users/ansonkao/events{/privacy}","received_events_url":"https://api.github.com/users/ansonkao/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T20:25:44Z","updated_at":"2015-08-10T20:25:44Z","body":"@edhenderson found it. Have a look through these 2 links, hope it helps!\r\n\r\nhttps://github.com/mgcrea/angular-strap/issues/1448\r\nhttp://stackoverflow.com/questions/26263169/how-to-retain-cursor-position-when-updating-a-knockout-js-observable-in-an-exten?rq=1"}}