diff --git a/static/js/compose.js b/static/js/compose.js index db92c85492..7abc291a34 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -205,6 +205,12 @@ exports.start = function (msg_type, opts) { $('.message_comp').show(); opts = fill_in_opts_from_current_narrowed_view(msg_type, opts); + // If we are invoked by a compose hotkey (c or C), do not assume that we know + // what the message's topic or PM recipient should be. + if (opts.trigger === "compose_hotkey") { + opts.subject = ''; + opts.private_message_recipient = ''; + } if (compose.composing() && !same_recipient_as_before(msg_type, opts)) { // Clear the compose box if the existing message is to a different recipient diff --git a/static/js/hotkey.js b/static/js/hotkey.js index f3b5fc1675..af74f47cd9 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -245,10 +245,10 @@ function process_hotkey(e) { } return true; case 'compose': // 'c': compose - compose.start('stream'); + compose.start('stream', {trigger: "compose_hotkey"}); return true; case 'compose_private_message': - compose.start('private'); + compose.start('private', {trigger: "compose_hotkey"}); return true; case 'search': search.initiate_search();