mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Cause shift-enter to insert a newline, even if enter sends.
This fixes Trac #1018. (imported from commit 9f1bc3ef3c86077a8852ba7fd23a184a4eac9e68)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user