From dcba1e3f461b2aaeac1d5ea6dc3291abce3b268c Mon Sep 17 00:00:00 2001 From: Waseem Daher Date: Wed, 27 Feb 2013 23:41:32 -0500 Subject: [PATCH] Cause shift-enter to insert a newline, even if enter sends. This fixes Trac #1018. (imported from commit 9f1bc3ef3c86077a8852ba7fd23a184a4eac9e68) --- zephyr/static/js/composebox_typeahead.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zephyr/static/js/composebox_typeahead.js b/zephyr/static/js/composebox_typeahead.js index ad47381caa..591a08ede3 100644 --- a/zephyr/static/js/composebox_typeahead.js +++ b/zephyr/static/js/composebox_typeahead.js @@ -99,7 +99,10 @@ function handle_keydown(e) { // If no typeaheads are shown and the user has configured enter to send, // then make enter send instead of inserting a line break. - if (e.target.id === "new_message_content" && code === 13 && enter_sends) { + // (Unless shift is being held down, which we *do* want to insert a linebreak) + if (e.target.id === "new_message_content" + && code === 13 && !e.shiftKey + && enter_sends) { e.preventDefault(); compose.finish(); }