Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose: Restore low-attention recipient row when narrow matches.
Karl Stolleyaae826744ef8
diff --git a/web/src/compose_recipient.ts b/web/src/compose_recipient.tsindex 8730b6bd0ef..428845cfe90 100644--- a/web/src/compose_recipient.ts+++ b/web/src/compose_recipient.ts@@ -73,8 +73,7 @@ export let update_recipient_row_attention_level = (): void => {// that call set_high_attention_recipient_row().if ((composing_to_current_topic_narrow() || composing_to_current_private_message_narrow()) &&- compose_state.has_full_recipient() &&- !compose_state.is_recipient_edited_manually()+ compose_state.has_full_recipient()) {$("#compose-recipient").toggleClass("low-attention-recipient-row", true);} else {diff --git a/web/src/compose_setup.js b/web/src/compose_setup.jsindex 7b7c9315e7d..9c1517cb7ea 100644--- a/web/src/compose_setup.js+++ b/web/src/compose_setup.js@@ -603,9 +603,9 @@ export function initialize() {const $input = $("input#stream_message_recipient_topic");compose_recipient.update_topic_displayed_text($input.val(), true);compose_recipient.update_compose_area_placeholder_text();- // Once the topic input has been focused, we no longer treat+ // When the topic input is focused, we no longer treat// the recipient row as low attention, as we assume the user- // has done something that requires keeping attention called+ // is doing something that requires keeping attention called// to the recipient rowcompose_recipient.set_high_attention_recipient_row();@@ -620,13 +620,17 @@ export function initialize() {});$("#private_message_recipient").on("focus", () => {- // Once the DM input has been focused, we no longer treat+ // When the DM input is focused, we no longer treat// the recipient row as low attention, as we assume the user- // has done something that requires keeping attention called+ // is doing something that requires keeping attention called// to the recipient rowcompose_recipient.set_high_attention_recipient_row();});+ $("input#stream_message_recipient_topic, #private_message_recipient").on("blur", () => {+ compose_recipient.update_recipient_row_attention_level();+ });+$(window).on("blur", () => {// Save drafts when the window loses focus to help// ensure no work is lost