Skip to content

Commit 2e8ba08

Browse files
committed
[#1223] re-add editor focus
1 parent d5c661a commit 2e8ba08

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client/modules/IDE/components/Editor.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,8 @@ class Editor extends React.Component {
346346
}
347347
);
348348
this._cm.doc.setValue(formatted);
349-
if (cursorOffset) {
350-
this._cm.doc.setCursor(this._cm.doc.posFromIndex(cursorOffset));
351-
}
349+
this._cm.focus();
350+
this._cm.doc.setCursor(this._cm.doc.posFromIndex(cursorOffset));
352351
} catch (error) {
353352
console.error(error);
354353
}

0 commit comments

Comments
 (0)