javascript – autosuggest – to activate key board arrow to view the list – Education Career Blog

on the above site there is a location bar and if you type any state (US) it will display an autosuggest list but it will not allow key board strokes to select the list,

eg: no down arrow is working there.

any help please



It doesn’t look the arrow keys are detected, you have to implement it.

You should have somewhere in the function suggest a code that handle the arrow keys like:

switch(keyCode) {
    case 38: 
        //up arrow, highlight previous entry
    case 40: //down arrow 
        //up arrow, highlight next entry

Leave a Comment