Found solution myself. I'm using onkeypress="return checkEnter(this,event);" on the autocompletion input field. The checkEnter function is taken from http://jennifermadden.com/javascript/stringEnterKeyDetector.html
Inside checkEnter, I'm running this code to hide any autocompletion div's: $(".ac_results").css("display", "none"); On 7 Sep, 20:50, janid1967 <janid1...@gmail.com> wrote: > Hi, I've just started using the jQuery Autocomplete plugin (http:// > docs.jquery.com/Plugins/Autocomplete). > I get my completions from a serverside service. Currently I'm using > the option selectFirst: false. > > When I'm using Enter without selecting from the completion list, this > submits my form. This is fine, but the displayed completions stay > visible after submit. How can I hide displayed completions when > hitting Enter without selecting a entry? > (As expected, displayed completion list disappear when selecting a > entry and hit Enter or Tab) > > Please advice > JI