I tried some suggestions like recording when user hits “down arrow” key, but it is not robust. When user hits down arrow and then uses mouse click to select from drop down autocomplete list then the method breaks.
Can you please tell me if there’s a robust way to distinguish if the user’s “enter” key event is trying to submit the form or select from drop down autocomplete?
Thanks
check if the user has a focus on the dropdown.
For example
this is done by jquery jquery Focus