diff --git a/app/assets/javascripts/posts.js b/app/assets/javascripts/posts.js index 71c202188..78494fc85 100644 --- a/app/assets/javascripts/posts.js +++ b/app/assets/javascripts/posts.js @@ -68,10 +68,14 @@ }); } }); + $fields.on("autocompleteopen", function() { Danbooru.autocompleting = true; }); + $fields.on("autocompleteclose", function() { + // this is needed otherwise the var is disabled by the time the + // keydown is triggered setTimeout(function() {Danbooru.autocompleting = false;}, 100); });