title: jQuery UI Autocomplete behaviour. How to search free text on enter?
body: <p>first question (and hopefully, but doubtfully my only one)</p>
  
  <p>I'm using the jQuery UI Autocomplete. Here is sample code to replicate my issue.</p>
  
  <pre><code>var suggestions = ["C", "Clojure", "JavaScript", "Perl", "PHP"];
  
  $("#autocomplete").autocomplete({
      source: suggestions
  });
  </code></pre>
  
  <p>When a user types 'J' they will be presented with 'Clojure' and 'JavaScript' as suggestions.</p>
  
  <p>I have omitted Java from this list, if the user wants to search for Java, they type 'Java', press the enter key but the form does not submit. If you add a space the 'JavaScript' suggestion disappears and the form can be submitted by pressing the enter key.</p>
  
  <p>I am creating a free search, I want users to be able to search by pressing enter even if there are suggestions available.</p>
  
  <pre><code>$("#autocomplete").keypress(function(event) {
    alert(event.keyCode);
    if (event.keyCode=='13') $this.closest('form').submit();
  });
  </code></pre>
  
  <p>I tried the above thinking I could manually detect a submit keypress and submit the form, but the alert shows all keys are detected EXCEPT submit which seems to be suppressed by the autocomplete.</p>
  
  <p>Any help is greatly appreciated! Thanks.</p>