Closed bmdatl closed 6 years ago
I've bypassed
the issue by adding the auto-select-first-item="true"
argument. That way on <enter>
, the first item is selected from the list.
I've added a PR to prevent that the select list hides on
That doesn't quite solve my issue. If a user is typing in my input and hits "enter" before the search even has a chance to return results, the search is stopped and no results are shown. If there are results, they will go to the first item, true -- but selecting an item in my list navigates the user to another page. I do not want that to happen on enter key.
I need to disable the enter key from having any effect whatsoever. I will keep looking for a solution.
The workaround is not what you are looking for. The PR i've added does resolve your issue however. It keeps track of the
Fantastic! I'll keep an eye out for it. Thank you.
Essentially, I want to disable the enter key entirely. The user should have to click on one of the results to navigate to it. Currently, hitting the enter key does not select the first item, which is good. However, it hides the results dropdown. I need to prevent this behavior.
I have tried quite a few methods, including checking the keyCode on (keydown) and returning false if it == 13. I also tried playing with most of the attributes in the documentation with no avail. Does anybody know how to do this?