Instead of getting a really long list of results that possibly extend over the screen it should be possibly to clip the result box. If you set a "max-height" and the "overflow" attribute to "auto" you will get just that. Awesomecomplete will however not understand that, which becomes clear when you navigate with the keyboard to an item outside the view.
By leveraging "scrollIntoView" only a few lines of code will take care of that for us. Most browsers have that function, though I don't know about cellphones and pads, so I added a check for it.
Instead of getting a really long list of results that possibly extend over the screen it should be possibly to clip the result box. If you set a "max-height" and the "overflow" attribute to "auto" you will get just that. Awesomecomplete will however not understand that, which becomes clear when you navigate with the keyboard to an item outside the view.
By leveraging "scrollIntoView" only a few lines of code will take care of that for us. Most browsers have that function, though I don't know about cellphones and pads, so I added a check for it.