autocomplete custom display, prevent popup from closing

autocomplete custom display, prevent popup from closing

I have altered the options display like this

  1. $('#search').autocomplete({......})
  2. .data("ui-autocomplete")._renderItem = function (ul, item) { //custom display 
  3.     return $("<li>")
  4.     .data("item.autocomplete", item)
  5.     .append("<input type='text' maxlength='3' size='3' /><a>" + item.label + "<br>" + item.den_prod + "</a>")
  6.     .appendTo(ul)
  7. };

so now I have a text input field for each option returned by autocomplete, but when I am trying to click in the field to type some value the corresponding option is selected and the popup closed. How can i prevent that ?