简体   繁体   中英

Devbridge autocomplete down/up arrow issues

I'm using the jquery autocomplete by devbridge: https://github.com/devbridge/jQuery-Autocomplete

Every time I press the arrow keys to navigate through the suggestions my entire parent div displays none. As soon as I click on the text input again the suggestions reappear. I have not altered the files from github at all, but I don't think this is how it is supposed to function from what I've read scrolling through the $.autocomplete methods. Does anyone have experience with this? Let me know what other information to provide.

I am calling the autocomplete as suggested:

 $("#input").autocomplete({ serviceUrl: "/index.cfm/autocomplete/getLocations" });

My response from the ajax appears to be in the right format:

 {"suggestions": [{"value": "Orlando, OK", "data": 123447},{"value": "Orlando, FL", "data": 101833}]}

I can also select certain suggestions when hovering: 在此处输入图像描述

The only functions that don't appear to work correctly are the down and up arrows.

I'm an idiot. I was calling $.autocomplete within an on keydown. Everything works great now. Sometimes you need to zoom out to fix the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM