2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-22 04:45:12 +00:00

Return false in click handler to prevent default behaviour.

This is useful when the input field is located in a dropdown or something similar
and prevents it to be closed.
This commit is contained in:
Markus Kasten 2014-04-28 13:29:14 +02:00
parent 2874ec2d8d
commit c4cd2fb061

View File

@ -169,6 +169,7 @@
// Listen for click event on suggestions list:
container.on('click.autocomplete', suggestionSelector, function () {
that.select($(this).data('index'));
return false;
});
that.fixPosition();