Commit 878b106c authored by Joachim Vandersmissen's avatar Joachim Vandersmissen Committed by JC Brand

Allow for shift-enter to insert newlines (#1115)

* Allow for shift-enter to insert newlines

See issue #1081

* Update CHANGES.md
parent 81ed773b
......@@ -11,6 +11,7 @@
- #1091 There's now only one CSS file for all view modes.
- #1094 Show room members who aren't currently online
- #1106 Support for Roster Versioning
- #1081 Allow for shift-enter to insert newlines
- It's now also possible to edit your VCard via the UI
- Automatically grow/shrink input as text is entered/removed
- MP4 and MP3 files when sent as XEP-0066 Out of Band Data, are now playable directly in chat
......
......@@ -910,7 +910,7 @@
keyPressed (ev) {
/* Event handler for when a key is pressed in a chat box textarea.
*/
if (ev.keyCode === KEY.ENTER) {
if (ev.keyCode === KEY.ENTER && !ev.shiftKey) {
this.onFormSubmitted(ev);
} else if (ev.keyCode !== KEY.FORWARD_SLASH && this.model.get('chat_state') !== _converse.COMPOSING) {
// Set chat state to composing if keyCode is not a forward-slash
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment