title: Prevent Jquery autocomplete options from closing after each selection
body: <p>I am using <a href="http://jqueryui.com/demos/autocomplete/#multiple">Jquery UI's autocomplete for multiple selectable values</a>. All is good except the list of options closes after each selection. I would like the options to stay open until the user decides they are done making selections. I have looked through the documentation and I don't see any way to keep the options open. Any ideas?</p>
  
  <pre><code>&lt;meta charset="utf-8"&gt;
  
  &lt;script&gt;
  $(function() {
      var availableTags = [
          "ActionScript",
          "AppleScript",
          "Asp",
          "BASIC",
          "C",
          "C++",
          "Clojure",
          "COBOL",
          "ColdFusion",
          "Erlang",
          "Fortran",
          "Groovy",
          "Haskell",
          "Java",
          "JavaScript",
          "Lisp",
          "Perl",
          "PHP",
          "Python",
          "Ruby",
          "Scala",
          "Scheme"
      ];
      function split( val ) {
          return val.split( /,\s*/ );
      }
      function extractLast( term ) {
          return split( term ).pop();
      }
  
      $( "#tags" ).autocomplete({
          minLength: 0,
          source: function( request, response ) {
              // delegate back to autocomplete, but extract the last term
              response( $.ui.autocomplete.filter(
                  availableTags, extractLast( request.term ) ) );
          },
          focus: function() {
              // prevent value inserted on focus
              return false;
          },
          select: function( event, ui ) {
              var terms = split( this.value );
              // remove the current input
              terms.pop();
              // add the selected item
              terms.push( ui.item.value );
              // add placeholder to get the comma-and-space at the end
              terms.push( "" );
              this.value = terms.join( ", " );
              return false;
          }
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  
  
  
      Tag programming languages: