0

I have created a field which displays a default list of options available on focus and allows users to search through the list and select the option they desire. And i want these options to be selectable using keyboard.

Keyboard selection of the default list is working fine. But, when i enter the search query in the field and try to select the options displayed using keyboard it does not work properly.

Please help me out on this.

Code here ----> http://jsbin.com/ujimih/10/edit

sami_ui
  • 110
  • 1
  • 3
  • 13
  • It seems to work fine to me, can you be more specific on your problem? – Niccolò Campolungo May 18 '13 at 17:09
  • Yes. works fine when no search query entered in the field. when u enter 'U' in the field, the options matching 'U' will be displayed, i.e USA(1option) and UK(4option). When u try to select them through key, then the selection will be not done properly. When the down key is pressed first time, USA will be selected, and for selecting UK, down arrow needs to be pressed 3 times, which should not be. UK should be selected on the second press of up key. – sami_ui May 18 '13 at 19:13
  • because some of your div have class selected but they are hidden – Manish Jangir May 18 '13 at 19:57
  • Yes exactly. even the hidden classes are getting selected. How to avoid it?? – sami_ui May 18 '13 at 20:09

0 Answers0