Honatas / bootstrap-4-autocomplete

A simple autocomplete/typeahead for Bootstrap 4 and jQuery
MIT License
56 stars 31 forks source link

Keyboard Arrows Throwing Console Errors When Pressed #37

Closed jottin closed 1 year ago

jottin commented 1 year ago

Hi, I am using this library with Bootstrap v5.1.3 and have noticed errors in the console when pressing the arrow keys to access the dropdown menu generated by autocomplete.

Uncaught TypeError: Cannot read properties of undefined (reading 'nextElementSibling') at Object.next (selector-engine.js:63:24) at hi._getMenuElement (dropdown.js:270:27) at new hi (dropdown.js:103:23) at hi.getOrCreateInstance (base-component.js:55:41) at HTMLDivElement.dataApiKeydownHandler (dropdown.js:453:31) at HTMLDocument.n (event-handler.js:119:21) next @ selector-engine.js:63 _getMenuElement @ dropdown.js:270 hi @ dropdown.js:103 getOrCreateInstance @ base-component.js:55 dataApiKeydownHandler @ dropdown.js:453 n @ event-handler.js:119

However, the tab key works fine. Tested on Chrome 110.0.5481.178 and Firefox 111.0.1 on Windows 10

Honatas commented 1 year ago

Hi jottin. This lib is not supposed to work with Bootstrap 5.

jottin commented 1 year ago

Sorry, I didn't realize the add-on for bs5 wasn't developed here. I found your library from this url... https://www.jqueryscript.net/form/autocomplete-typahead-bootstrap-dropdown.html

and used the bs5 one from that same page above which links here... https://www.cssscript.com/autocomplete-typeahead-bootstrap-5/

Honatas commented 1 year ago

Oh, wow ... I didn't even know it was listed there, and with a documentation written by someone else ... cool!! And I also didn't know someone adapted it to Bootstrap 5, that's even cooler!! But anyway, you should open an issue there, since I don't have any connection with that project.

jottin commented 1 year ago

Thanks for your help. Those sites aren't resolving any recent bugs... and that stinks. Plus, posting or replying to comments seems to not be working. After researching this issue, I can't find any relevant information either. Stumped. Although, I know the error definitely has to do with the bs5 integration... just not sure how to solve it.