catch this for now as caret behaviour is still a bit flaky
This commit is contained in:
parent
580a89875a
commit
8d97c0033e
1 changed files with 6 additions and 2 deletions
|
@ -66,9 +66,13 @@ export default class MessageEditor extends React.Component {
|
|||
renderModel(this._editorRef, this.model);
|
||||
}
|
||||
if (caret) {
|
||||
setCaretPosition(this._editorRef, caret);
|
||||
try {
|
||||
setCaretPosition(this._editorRef, caret);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("_updateEditorState", this.state.autoComplete, this.model.autoComplete);
|
||||
this.setState({autoComplete: this.model.autoComplete});
|
||||
const modelOutput = this._editorRef.parentElement.querySelector(".model");
|
||||
modelOutput.textContent = JSON.stringify(this.model.serializeParts(), undefined, 2);
|
||||
|
|
Loading…
Reference in a new issue