From 3584cb704341e37706900c8157f6cc4e04d397fd Mon Sep 17 00:00:00 2001 From: r888888888 Date: Wed, 19 Jun 2013 14:30:18 -0700 Subject: [PATCH] add comment --- app/assets/javascripts/posts.js | 4 ++++ 1 file changed, 4 insertions(+) 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); });