From: Eugen Rochko Date: Sat, 23 Sep 2017 22:33:17 +0000 (+0200) Subject: Require at least 2 characters before showing autosuggestions (#5065) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=9c8aad612e09dbd45ea3d0df8a349cd4ce03b5e9;p=mastodon.git Require at least 2 characters before showing autosuggestions (#5065) --- diff --git a/app/javascript/mastodon/components/autosuggest_textarea.js b/app/javascript/mastodon/components/autosuggest_textarea.js index daeb6fd53..6f725885d 100644 --- a/app/javascript/mastodon/components/autosuggest_textarea.js +++ b/app/javascript/mastodon/components/autosuggest_textarea.js @@ -20,7 +20,7 @@ const textAtCursorMatchesToken = (str, caretPosition) => { word = str.slice(left, right + caretPosition); } - if (!word || word.trim().length < 2 || ['@', ':'].indexOf(word[0]) === -1) { + if (!word || word.trim().length < 3 || ['@', ':'].indexOf(word[0]) === -1) { return [null, null]; }