From a003fe0246903c00c6c6476792afc06f02c6a3a2 Mon Sep 17 00:00:00 2001 From: N-Shar-ma Date: Sat, 22 Jan 2022 15:33:21 +0530 Subject: [PATCH] compose: Fix bug where stream color didn't update on mouse selection. Called the `decorate` function to update stream color in the compose box on `change` instead of `blur`. On clicking on a stream option, the input box for the stream name remained in focus, hence decorate wasn't triggered on blur. Using the change event instead, ensures that decorate will be called anytime the stream is changed. Fixes: #20871 --- static/js/ui_init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/ui_init.js b/static/js/ui_init.js index 474e46bc16..a090bea34e 100644 --- a/static/js/ui_init.js +++ b/static/js/ui_init.js @@ -324,7 +324,7 @@ export function initialize_kitchen_sink_stuff() { $(this).removeClass("active"); }); - $("#stream_message_recipient_stream").on("blur", function () { + $("#stream_message_recipient_stream").on("change", function () { stream_bar.decorate(this.value, $("#stream-message .message_header_stream"), true); });