Show autocomplete on multichoice_selector focus

This commit is contained in:
rubenwardy 2018-05-26 00:28:52 +01:00
parent 968fd29bad
commit 48ebc751e4
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C
1 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,13 @@
input.val("");
return false;
}
}).focus(function() {
// The following works only once.
// $(this).trigger('keydown.autocomplete');
// As suggested by digitalPBK, works multiple times
// $(this).data("autocomplete").search($(this).val());
// As noted by Jonny in his answer, with newer versions use uiAutocomplete
$(this).data("ui-autocomplete").search($(this).val());
});
input.data('ui-autocomplete')._renderItem = function(ul, item) {