diff --git a/static/js/hotkey.js b/static/js/hotkey.js index e86bc4dc72..3c537977a9 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -166,7 +166,12 @@ exports.process_escape_key = function (e) { } if (message_edit.is_editing(current_msg_list.selected_id())) { - message_edit.end(current_msg_list.selected_row()); + // Using this definition of "row" instead of "current_msg_list.selected_row()" + // because it returns a more complete object. + // Necessary for refocusing on message list in Firefox. + row = $(".message_edit_content").filter(":focus").closest(".message_row"); + row.find('.message_edit_content').blur(); + message_edit.end(row); return true; }