diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-09-24 00:33:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-24 00:33:17 +0200 |
commit | 9c8aad612e09dbd45ea3d0df8a349cd4ce03b5e9 (patch) | |
tree | bfab7de946955c86c6a622825199df19fd988346 /app | |
parent | 6dfeb64326336dafb3e4f1a8fc38ba670be2eba3 (diff) |
Require at least 2 characters before showing autosuggestions (#5065)
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/components/autosuggest_textarea.js | 2 |
1 files changed, 1 insertions, 1 deletions
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]; } |