mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Merge pull request #4333 from matrix-org/dbkr/fix_edit_composer
Fix the edit messager composer
This commit is contained in:
commit
5cce31b39e
1 changed files with 3 additions and 6 deletions
|
@ -107,14 +107,15 @@ export default class EditMessageComposer extends React.Component {
|
||||||
|
|
||||||
static contextType = MatrixClientContext;
|
static contextType = MatrixClientContext;
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props, context) {
|
||||||
super(props);
|
super(props, context);
|
||||||
this.model = null;
|
this.model = null;
|
||||||
this._editorRef = null;
|
this._editorRef = null;
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
saveDisabled: true,
|
saveDisabled: true,
|
||||||
};
|
};
|
||||||
|
this._createEditorModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
_setEditorRef = ref => {
|
_setEditorRef = ref => {
|
||||||
|
@ -223,10 +224,6 @@ export default class EditMessageComposer extends React.Component {
|
||||||
this.props.editState.setEditorState(caret, parts);
|
this.props.editState.setEditorState(caret, parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this._createEditorModel();
|
|
||||||
}
|
|
||||||
|
|
||||||
_createEditorModel() {
|
_createEditorModel() {
|
||||||
const {editState} = this.props;
|
const {editState} = this.props;
|
||||||
const room = this._getRoom();
|
const room = this._getRoom();
|
||||||
|
|
Loading…
Reference in a new issue