mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
compose: Restore low-attention recipient row when narrow matches.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 row
|
||||
compose_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 row
|
||||
compose_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
|
||||
|
||||
Reference in New Issue
Block a user