不能导航角UI自举预输入与键盘的特定高度 [英] cannot navigate angular-ui boostrap typeahead with specific height with keyboard
问题描述
所以,我认为这是多角度的UI一个bootsrap问题,但我花了2个晚上了这一点,并在隧道的尽头,我不能找到光明。
So, I think it's more a bootsrap issue than angular-ui, but I spent 2 nights over this and I cannot find the light at the end of the tunnel.
这里的plunkr:
http://plnkr.co/edit/n39LVjbHQzmcwGkk2dR1?p=$p$pview一>
Here's the plunkr : http://plnkr.co/edit/n39LVjbHQzmcwGkk2dR1?p=preview
搜索X,然后尝试下井使用箭头键。项目将被选中,但他们不会获得焦点。
Search for "x" and then try to go down using the arrow keys. Items will be selected, but they will not gain focus.
任何想法?
推荐答案
下面是一个解决方案。我又增加了指令的预输入li元素 shouldFocus
的手表的积极价值变动。当它调用 scrollIntoView
的元素。
Here is a solution. I added another directive to the typeahead li element shouldFocus
that watches for its active value to change. When it does it calls scrollIntoView
on that element.
我想这被认为是一个黑客,但如果预输入允许动态模板,从标记设置,那么这将是一个有效的修复。
I guess this is considered a hack, but If typeahead allowed for dynamic templates, set from markup, then it would be a valid fix.
http://plnkr.co/edit/vzLHFqkHPUFCaaosVt5w?p=$p$ PVIEW
这篇关于不能导航角UI自举预输入与键盘的特定高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!