diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-05-26 00:28:52 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-05-26 00:28:52 +0100 |
| commit | 48ebc751e4439aeed18ace0f92500d9083520942 (patch) | |
| tree | cc009ce0f13b6da29d7aab964725fb279bcdac41 /app | |
| parent | 968fd29bad5a4a3242b77b196c94560c4643f52a (diff) | |
| download | cheatdb-48ebc751e4439aeed18ace0f92500d9083520942.tar.xz | |
Show autocomplete on multichoice_selector focus
Diffstat (limited to 'app')
| -rw-r--r-- | app/public/static/tagselector.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/public/static/tagselector.js b/app/public/static/tagselector.js index d00919e..d5895bf 100644 --- a/app/public/static/tagselector.js +++ b/app/public/static/tagselector.js @@ -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) { |
