diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.js index edc75aa99c..1da523f95c 100644 --- a/static/js/composebox_typeahead.js +++ b/static/js/composebox_typeahead.js @@ -156,8 +156,12 @@ exports.initialize = function () { select_on_focus("private_message_recipient"); // These handlers are at the "form" level so that they are called after typeahead - $("form#send_message_form").keydown(handle_keydown); - $("form#send_message_form").keyup(handle_keyup); + $("form#send_message_form").keydown(function (e) { + handle_keydown(e); + }); + $("form#send_message_form").keyup(function (e) { + handle_keyup(e); + }); $("#enter_sends").click(function () { var send_button = $("#compose-send-button"); diff --git a/static/js/message_edit.js b/static/js/message_edit.js index b1b636e75b..1ee2d29122 100644 --- a/static/js/message_edit.js +++ b/static/js/message_edit.js @@ -61,7 +61,9 @@ function edit_message (row, raw_content) { var edit_obj = {form: form, raw_content: raw_content}; current_msg_list.show_edit_message(row, edit_obj); - form.keydown(handle_edit_keydown); + form.keydown(function (e) { + handle_edit_keydown(e); + }); currently_editing_messages[message.id] = edit_obj; if (message.subject === compose.empty_subject_placeholder()) {