Skip to content

Commit c4cd2fb

Browse files
author
Markus Kasten
committed
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.
1 parent 2874ec2 commit c4cd2fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/jquery.autocomplete.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
// Listen for click event on suggestions list:
170170
container.on('click.autocomplete', suggestionSelector, function () {
171171
that.select($(this).data('index'));
172+
return false;
172173
});
173174

174175
that.fixPosition();

0 commit comments

Comments
 (0)