Skip to content
Snippets Groups Projects
Unverified Commit 2fce6e38 authored by Anton Georgiev's avatar Anton Georgiev Committed by GitHub
Browse files

Merge pull request #12282 from PhMemmel/waiting-room-message-area-improvement

Waiting room panel: Hitting enter sends message
parents 6d50d7cd 75db0b57
No related branches found
No related tags found
No related merge requests found
......@@ -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}
/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment