diff --git a/app/assets/javascripts/discourse/lib/autocomplete.js.es6 b/app/assets/javascripts/discourse/lib/autocomplete.js.es6 index 0d158734bd5..a142947da65 100644 --- a/app/assets/javascripts/discourse/lib/autocomplete.js.es6 +++ b/app/assets/javascripts/discourse/lib/autocomplete.js.es6 @@ -322,7 +322,8 @@ export default function(options) { } }; - $(this).on('keyup.autocomplete', function() { + $(this).on('keyup.autocomplete', function(e) { + if ([keys.esc, keys.enter].indexOf(e.which) !== -1) return true; var caretPosition = Discourse.Utilities.caretPosition(me[0]);