diff --git a/static/js/hotkey.js b/static/js/hotkey.js index a3a0ade230..7abbf08d97 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -330,6 +330,11 @@ exports.process_enter_key = function (e) { return true; } + if ($(e.target).attr("role") === "button") { + e.target.click(); + return false; + } + // If we're on a button or a link and have pressed Enter, let the // browser handle the keypress // @@ -342,11 +347,6 @@ exports.process_enter_key = function (e) { return false; } - if ($(e.target).attr("role") === "button") { - e.target.click(); - return false; - } - if ($("#preview_message_area").is(":visible")) { compose.enter_with_preview_open(); return true; diff --git a/static/templates/message_edit_form.hbs b/static/templates/message_edit_form.hbs index 7a56998f37..5303378c70 100644 --- a/static/templates/message_edit_form.hbs +++ b/static/templates/message_edit_form.hbs @@ -62,16 +62,16 @@ {{#if is_content_editable}}
{{/if}} {{else}}