Chats: use textarea instead of input

This commit is contained in:
Alex Gleason
2020-08-27 19:25:16 -05:00
parent 3fbdce6901
commit e682c3db28
2 changed files with 5 additions and 4 deletions

View File

@ -63,6 +63,7 @@ class ChatWindow extends ImmutablePureComponent {
if (e.key === 'Enter') {
this.props.dispatch(sendChatMessage(chatId, this.state));
this.setState({ content: '' });
e.preventDefault();
}
};
}
@ -134,9 +135,9 @@ class ChatWindow extends ImmutablePureComponent {
</div>
<div className='pane__content'>
<ChatMessageList chatMessageIds={chatMessageIds} />
<div className='pane__actions'>
<input
type='text'
<div className='pane__actions simple_form'>
<textarea
rows={1}
placeholder='Send a message...'
onKeyDown={this.handleKeyDown(chat.get('id'))}
onChange={this.handleContentChange}

View File

@ -93,7 +93,7 @@
margin-top: auto;
padding: 6px;
input {
textarea {
width: 100%;
margin: 0;
box-sizing: border-box;