Typeahead Losing专注于输入输入

时间:2023-01-25 18:25:48

When I type a character and as soon as typeahead popup opens with matched elements, the focus gets lost from the input element. I have to manually set the focus back again into the input element. Why is this happening? FYI, I found a similar closed issue in here without any proper answer:

当我输入一个字符时,只要打开一个带有匹配元素的预先输出弹出窗口,焦点就会从输入元素中丢失。我必须手动将焦点重新设置回输入元素。为什么会这样?仅供参考,我在这里找到了一个类似的封闭问题,没有任何正确答案:

https://github.com/angular-ui/bootstrap/issues/2598

I am not finding any solution to this. I am using ui-bootstrap-tpls-0.12.1.js version. I created a plunker using the same libraries but in plunker everything is working properly. Any help would be greatly appreciated.

我没有找到任何解决方案。我使用的是ui-bootstrap-tpls-0.12.1.js版本。我使用相同的库创建了一个plunker但在plunker中一切正常。任何帮助将不胜感激。

1 个解决方案

#1


Using of old version of angular-block-ui v0.0.12 was creating the focus losing problem. Found an issue https://github.com/McNull/angular-block-ui/issues/37. Updating angular-block-ui version to v0.1.0-beta.3 or upper will fix the problem.

使用旧版本的angular-block-ui v0.0.12正在创建焦点丢失问题。发现问题https://github.com/McNull/angular-block-ui/issues/37。将angular-block-ui版本更新到v0.1.0-beta.3或更高版本将解决问题。

#1


Using of old version of angular-block-ui v0.0.12 was creating the focus losing problem. Found an issue https://github.com/McNull/angular-block-ui/issues/37. Updating angular-block-ui version to v0.1.0-beta.3 or upper will fix the problem.

使用旧版本的angular-block-ui v0.0.12正在创建焦点丢失问题。发现问题https://github.com/McNull/angular-block-ui/issues/37。将angular-block-ui版本更新到v0.1.0-beta.3或更高版本将解决问题。