Closed Carl-Wilhelm closed 3 years ago
I found a solution to fix this. I used javascript to disable form submit on "enter" with this code:
$("selector").keypress(function(event){ var keycode = (event.keyCode ? event.keyCode : event.which); if (keycode == '13') { event.preventDefault(); event.stopPropagation(); return false; } });
Then i edited the jquery.autocomplete.js file by commenting out these lines:
case keys.RETURN: if (that.selectedIndex === -1) { //that.hide(); //return; } that.select(that.selectedIndex); break;
I also commented out TAB behaviour, because i did not want that.
Looks like you solved your issue. Closing this.
When i press enter on keyboard, all suggestions disappear, and i can not find a way to prevent this behavior. Do you have a solution for this?
Thanks.