3

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.

Here's the plunkr : http://plnkr.co/edit/n39LVjbHQzmcwGkk2dR1?p=preview

Search for "x" and then try to go down using the arrow keys. Items will be selected, but they will not gain focus.

Any ideas?

madth3
  • 7,275
  • 12
  • 50
  • 74
Bancu Adrian
  • 31
  • 1
  • 2
  • Did you found any solution for this? Please revert. – ankitd Jan 13 '15 at 06:07
  • Take a look at http://stackoverflow.com/questions/27705490/up-down-arrow-key-issue-with-typeahead-control-angular-bootstrap-ui/32967199#32967199 for a possible solution. – almeidap Oct 06 '15 at 11:57

1 Answers1

3

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=preview

joshkurz
  • 1,033
  • 7
  • 12
  • 1
    This is not working when page having scroll and input element is little below.please help me to resolve this. – KanhuP2012 Mar 23 '15 at 07:25