Closed tonytomov closed 1 year ago
@tonytomov yep, actually, handling any keyboard event related to the dropdown when the dropdown is not visible does not make a lot of sense. i disabled all of them when the dropdown is not visible. it's on master
It is working as expected. Thanks.
I have situation in inline form where the user can select a value from autocomplete. It is working ok, but the problem is when the user select a value from autocomplete and pres enter, the value is selected, but pressing again Enter to search on this value nothing happen.
Maybe the reason for this is the onkeydown(e) function
As can be seen first preventDefault is run and then selection is done, which of course mean that every time a enter is pressed a preventDefault is run.
My suggestion is to move the preventDefault right after the if
This way when press first time enter, the value is selected, and press second time enter will invoke the other function related to the input.