1

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

1 Answer 1

1

You can play with the select event:

select : function(event, selectedObject) {
  jQuery(this).val(selectedObject.item.value);
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.