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
This commit is contained in:
N-Shar-ma 2022-01-22 15:33:21 +05:30 committed by Tim Abbott
parent 48024097c4
commit a003fe0246
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ export function initialize_kitchen_sink_stuff() {
$(this).removeClass("active"); $(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); stream_bar.decorate(this.value, $("#stream-message .message_header_stream"), true);
}); });