allow message input textarea height to grow with more text

This commit is contained in:
or-else
2023-03-14 13:53:21 -07:00
parent 43798ea1d9
commit 5ae58fb2a6
7 changed files with 20 additions and 7 deletions
+3 -1
View File
@@ -14981,6 +14981,8 @@ class SendMessage extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
if (window.getComputedStyle(this.messageEditArea).getPropertyValue('transition-property') == 'all') {
this.messageEditArea.focus();
}
this.messageEditArea.style.height = '0px';
this.messageEditArea.style.height = this.messageEditArea.scrollHeight + 'px';
}
if (prevProps.topicName != this.props.topicName) {
this.setState({
@@ -15151,7 +15153,7 @@ class SendMessage extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
placeholder: prompt,
value: this.state.message,
onChange: this.handleMessageTyping,
onKeyPress: this.handleKeyPress,
onKeyDown: this.handleKeyPress,
ref: ref => {
this.messageEditArea = ref;
}