Chats: use textarea instead of input

loading-indicator-on-tls^2
Alex Gleason 2020-08-27 19:25:16 -05:00
rodzic 3fbdce6901
commit e682c3db28
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

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

Wyświetl plik

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