kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Chats: use textarea instead of input
rodzic
3fbdce6901
commit
e682c3db28
|
@ -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}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Ładowanie…
Reference in New Issue