message_list: Add `content_edit_mode` when editing a message.

Having the class at the top of message DOM structure when the
user is editing a message, helps apply css when user is editing
a message.

Short prep commit for the next commit; no visible changes
This commit is contained in:
Aman Agrawal 2022-11-28 03:09:16 +00:00 committed by Tim Abbott
parent fe03d2a533
commit 953277bdae
1 changed files with 2 additions and 0 deletions

View File

@ -298,6 +298,7 @@ export class MessageList {
$row.find(".message_edit_form").append(edit_obj.$form);
$row.find(".message_content, .status-message, .message_controls").hide();
$row.find(".sender-status").toggleClass("sender-status-edit");
$row.find(".messagebox-content").addClass("content_edit_mode");
$row.find(".message_edit").css("display", "block");
autosize($row.find(".message_edit_content"));
}
@ -306,6 +307,7 @@ export class MessageList {
$row.find(".message_content, .status-message, .message_controls").show();
$row.find(".sender-status").toggleClass("sender-status-edit");
$row.find(".message_edit_form").empty();
$row.find(".messagebox-content").removeClass("content_edit_mode");
$row.find(".message_edit").hide();
$row.trigger("mouseleave");
}