diff --git a/web/src/bootstrap_typeahead.js b/web/src/bootstrap_typeahead.js index 26ba25cbac..24f7e2750e 100644 --- a/web/src/bootstrap_typeahead.js +++ b/web/src/bootstrap_typeahead.js @@ -585,7 +585,10 @@ Typeahead.prototype = { return; } setTimeout(() => { - if (!this.$container.is(":hover")) { + if (!this.$container.is(":hover") && !this.$element.is(":focus")) { + // We do not hide the typeahead in case it is being hovered over, + // or if the focus is immediately back in the input field (likely + // when using compose formatting buttons). this.hide(); } else if (this.shown) { // refocus the input if the user clicked on the typeahead