ui: fix messagepad render, fix #1074

This commit is contained in:
undefined committed 2025-11-06 21:39:29 +08:00
1 parent 3996f6f2ef
commit 11b932cee4
4 files changed
+13 -20

No files matched your search

@@ -55,7 +55,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class MessagePadInpu
);
if (this.focusInput) {
const { scrollX, scrollY } = window;
this.refs.input.focus();
this.state.ref?.focus();
window.scrollTo(scrollX, scrollY);
}
}
@@ -81,7 +81,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class MessagePadInpu
<div className={cn}>
<div className="messagepad__textarea-container">
<textarea
ref="input"
ref={(ref) => this.setState({ ...this.state, ref })}
data-markdown
disabled={this.props.isPosting}
value={this.props.inputValue}