allow message input textarea height to grow with more text
This commit is contained in:
@@ -111,6 +111,10 @@ class SendMessage extends React.PureComponent {
|
||||
// Set focus on desktop, but not on mobile: focus causes soft keyboard to pop up.
|
||||
this.messageEditArea.focus();
|
||||
}
|
||||
|
||||
// Adjust height of the message area for the amount of text.
|
||||
this.messageEditArea.style.height = '0px';
|
||||
this.messageEditArea.style.height = this.messageEditArea.scrollHeight + 'px';
|
||||
}
|
||||
|
||||
if (prevProps.topicName != this.props.topicName) {
|
||||
@@ -276,7 +280,7 @@ class SendMessage extends React.PureComponent {
|
||||
</Suspense>) :
|
||||
<textarea id="send-message-input" placeholder={prompt}
|
||||
value={this.state.message} onChange={this.handleMessageTyping}
|
||||
onKeyPress={this.handleKeyPress}
|
||||
onKeyDown={this.handleKeyPress}
|
||||
ref={ref => {this.messageEditArea = ref;}} />)}
|
||||
{this.state.message || !audioEnabled ?
|
||||
<a href="#" onClick={this.handleSend} title={formatMessage(messages.icon_title_send)}>
|
||||
|
||||
Reference in New Issue
Block a user