I'd specifically like to prevent the interaction when I push ENTER to prevent jQueryUI Autocomplete from selecting the currently focused item and closing the menu.
I'm referring to the following documentation: http://api.jqueryui.com/autocomplete/#event-change
UPDATE:
The principle is the same. Just change the
setTimeout
function to submit your form instead (as demonstrated here: http://jsfiddle.net/X8Ghc/8/)UPDATE:
You are correct,
$(this)
was supposed to refer to theui-menu
(and obviously didn't). The new fiddle, http://jsfiddle.net/X8Ghc/7/, works reasonably well.Original:
This works in a fiddle: