Reputation: 693
I have a problem with JQuery UI Autocomplete.
I want it to behave like this:
If I have positioned my mouse right under the input and entering values, so the autocomplete appears and press enter, the script will select the value from the autocomplete list. I'd rather want the script to just close and select the user entered value.
In short form: I want autocomplete just to replace the input text if a user actually clicks on a suggestion.
Is this possible somehow?
Best Regards
Upvotes: 1
Views: 631
Reputation: 16999
You can play with the select event:
select : function(event, selectedObject) {
jQuery(this).val(selectedObject.item.value);
}
Upvotes: 1