Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose: Save drafts when starting compose might destroy content.

Tim Abbotted4ff268a8ce
diff --git a/static/js/compose_actions.js b/static/js/compose_actions.js
index a54fd8dc6e6..36407e1b0c3 100644
--- a/static/js/compose_actions.js
+++ b/static/js/compose_actions.js
@@ -222,6 +222,10 @@ export function start(msg_type, opts) {
return;
}
+ // We may be able to clear it to change the recipient, so save any
+ // existing content as a draft.
+ drafts.update_draft();
+
autosize_message_content();
if (reload_state.is_in_progress()) {
@@ -328,10 +332,6 @@ export function cancel() {
}
export function respond_to_message(opts) {
- // Before initiating a reply to a message, if there's an
- // in-progress composition, snapshot it.
- drafts.update_draft();
-
let message;
let msg_type;
if (recent_topics_util.is_visible()) {