From c74f116a48b3bac29b91712ad6d38a87fc7eb2af Mon Sep 17 00:00:00 2001 From: Osama Sayegh Date: Mon, 23 Aug 2021 07:19:38 +0300 Subject: [PATCH] FIX: Close emoji autocomplete when the opening colon `:` is removed (#14102) --- app/assets/javascripts/discourse/app/lib/autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/lib/autocomplete.js b/app/assets/javascripts/discourse/app/lib/autocomplete.js index 99b77405a97..a041b11d481 100644 --- a/app/assets/javascripts/discourse/app/lib/autocomplete.js +++ b/app/assets/javascripts/discourse/app/lib/autocomplete.js @@ -580,7 +580,7 @@ export default function (options) { } // If we've backspaced past the beginning, cancel unless no key - if (cp <= completeStart && options.key) { + if (cp - 1 <= completeStart && options.key) { closeAutocomplete(); return true; }