UX: Keep focus on input after selecting an autocomplete option

UX: Keep focus on input after selecting an autocomplete option

This is particularly helpful on mobile, now tapping on an item from the autocomplete dropdown keeps the keyboard visible.

diff --git a/app/assets/javascripts/discourse/app/lib/autocomplete.js b/app/assets/javascripts/discourse/app/lib/autocomplete.js
index 03fc408..eea9f8e 100644
--- a/app/assets/javascripts/discourse/app/lib/autocomplete.js
+++ b/app/assets/javascripts/discourse/app/lib/autocomplete.js
@@ -274,6 +274,9 @@ export default function(options) {
     ul.find("li").click(function() {
       selectedOption = ul.find("li").index(this);
       completeTerm(autocompleteOptions[selectedOption]);
+      if (!options.single) {
+        me.focus();
+      }
       return false;
     });
     var pos = null;

GitHub sha: 7bc49607