mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Fix the edit messager composer
Broken in https://github.com/matrix-org/matrix-react-sdk/pull/4313 Fixes https://github.com/vector-im/riot-web/issues/13001
This commit is contained in:
parent
6db51cf9aa
commit
74186740ee
@ -107,14 +107,15 @@ export default class EditMessageComposer extends React.Component {
|
||||
|
||||
static contextType = MatrixClientContext;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
this.model = null;
|
||||
this._editorRef = null;
|
||||
|
||||
this.state = {
|
||||
saveDisabled: true,
|
||||
};
|
||||
this._createEditorModel();
|
||||
}
|
||||
|
||||
_setEditorRef = ref => {
|
||||
@ -223,10 +224,6 @@ export default class EditMessageComposer extends React.Component {
|
||||
this.props.editState.setEditorState(caret, parts);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this._createEditorModel();
|
||||
}
|
||||
|
||||
_createEditorModel() {
|
||||
const {editState} = this.props;
|
||||
const room = this._getRoom();
|
||||
|
Loading…
Reference in New Issue
Block a user