diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 946bb83c..762409e7 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -280,10 +280,10 @@ class Editor extends React.Component { } else if (mode === 'htmlmixed') { this._cm.doc.setValue(beautifyHTML(this._cm.doc.getValue(), beautifyOptions)); } - setImmediate(() => { + setTimeout(() => { this._cm.focus(); this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch + INDENTATION_AMOUNT }); - }); + }, 0); } initializeDocuments(files) {