From 6314f60edc36018b6308356e0cc51d39a39ffa98 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 27 Mar 2017 10:15:05 -0700 Subject: [PATCH] Keep compose open if left arrow does not cause message edit. If somebody hits the left arrow to edit a message, but there are no messages available to edit, then leave them in the compose box. --- static/js/hotkey.js | 1 - static/js/message_edit.js | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/hotkey.js b/static/js/hotkey.js index 06c0b91e99..05356a6fd6 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -507,7 +507,6 @@ exports.process_hotkey = function (e, hotkey) { // we handle this in other functions. if (event_name === 'left_arrow' && focus_in_empty_compose()) { - compose_actions.cancel(); message_edit.edit_last_sent_message(); return true; } diff --git a/static/js/message_edit.js b/static/js/message_edit.js index 51b38d899d..67735636a6 100644 --- a/static/js/message_edit.js +++ b/static/js/message_edit.js @@ -400,6 +400,7 @@ exports.edit_last_sent_message = function () { current_msg_list.select_id(msg.id, {then_scroll: true, from_scroll: true}); // Finally do the real work! + compose_actions.cancel(); message_edit.start(msg_row, function () { ui_util.focus_on('message_edit_content'); });