Angularjs ui typeahead to focus after select

拜拜、爱过 提交于 2021-01-29 03:09:44

问题


You can even see the problem in the angular ui's demo.

http://angular-ui.github.io/bootstrap/

Typeahead once you select a suggested value loses focus on the input prevent you from submitting it. How do I get it to focus on the input after a suggested value is clicked upon.


回答1:


Put this line into typeahead.js:148 select function.

element[0].focus();

See here: http://plnkr.co/edit/XB5ybI?p=preview



来源:https://stackoverflow.com/questions/16955353/angularjs-ui-typeahead-to-focus-after-select

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!