diff --git a/web/src/message_edit.ts b/web/src/message_edit.ts index 5e32d57f72..42700a50ca 100644 --- a/web/src/message_edit.ts +++ b/web/src/message_edit.ts @@ -381,7 +381,7 @@ function handle_message_edit_enter( ): void { // Pressing Enter to save edits is coupled with Enter to send if (composebox_typeahead.should_enter_send(e)) { - const $row = $(".message_edit_content:focus").closest(".message_row"); + const $row = $message_edit_content.closest(".message_row"); const $message_edit_save_button = $row.find(".message_edit_save"); if ($message_edit_save_button.prop("disabled")) { // In cases when the save button is disabled