From 75db0b57ea1a2a13997a0a218925624cef4a3f97 Mon Sep 17 00:00:00 2001 From: Philipp Memmel <philipp.memmel@thg.muenchen.musin.de> Date: Wed, 5 May 2021 06:51:43 +0000 Subject: [PATCH] Hitting Enter sends waiting room message --- .../imports/ui/components/text-input/component.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bigbluebutton-html5/imports/ui/components/text-input/component.jsx b/bigbluebutton-html5/imports/ui/components/text-input/component.jsx index d3a1a3d1eb..2c60c63663 100644 --- a/bigbluebutton-html5/imports/ui/components/text-input/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/text-input/component.jsx @@ -35,6 +35,13 @@ class TextInput extends PureComponent { this.setState({ message }); } + handleOnKeyDown(e) { + if (e.keyCode === 13 && e.shiftKey === false) { + e.preventDefault(); + this.handleOnClick(); + } + } + handleOnClick() { const { send } = this.props; const { message } = this.state; @@ -58,6 +65,7 @@ class TextInput extends PureComponent { className={styles.textarea} maxLength={maxLength} onChange={(e) => this.handleOnChange(e)} + onKeyDown={(e) => this.handleOnKeyDown(e)} placeholder={placeholder} value={message} /> -- GitLab