Skip to content

Commit 5937af2

Browse files
committed
changed setImmediate with setTimeout
1 parent 08f1c52 commit 5937af2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/modules/IDE/components/Editor.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ class Editor extends React.Component {
280280
} else if (mode === 'htmlmixed') {
281281
this._cm.doc.setValue(beautifyHTML(this._cm.doc.getValue(), beautifyOptions));
282282
}
283-
setImmediate(() => {
283+
setTimeout(() => {
284284
this._cm.focus();
285285
this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch + INDENTATION_AMOUNT });
286-
});
286+
}, 0);
287287
}
288288

289289
initializeDocuments(files) {

0 commit comments

Comments
 (0)