From 5937af22f365f83f6122c46a7ceb407de4ed10e8 Mon Sep 17 00:00:00 2001 From: ashu8912 Date: Sun, 26 Jan 2020 02:55:07 +0530 Subject: [PATCH] changed setImmediate with setTimeout --- client/modules/IDE/components/Editor.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {