From d491c7d53caecfa317091af093d2e1b3cc10ceb6 Mon Sep 17 00:00:00 2001 From: N-Shar-ma Date: Tue, 20 Feb 2024 11:43:30 +0530 Subject: [PATCH] typeahead: Fix bug where change event was not triggered post selection. This fixes a regression introduced in the commit making typeahead undo friendly, d88ce6180107b73f32beeaf41b3f648cd99064ec. This fixes the bug where selecting a topic via keyboard in the compose recipient area did not update the fade. --- web/src/bootstrap_typeahead.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/bootstrap_typeahead.js b/web/src/bootstrap_typeahead.js index 8a159286d3..460f2ee2a3 100644 --- a/web/src/bootstrap_typeahead.js +++ b/web/src/bootstrap_typeahead.js @@ -201,6 +201,7 @@ Typeahead.prototype = { // select / highlight the minimal text to be replaced this.$element[0].setSelectionRange(from, to_before); insertTextIntoField(this.$element[0], replacement); + this.$element.trigger("change"); } return this.hide();