diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter.js b/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter.js index f136002562..046099774f 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter.js @@ -50,4 +50,8 @@ export default CursorPositionAdapter = class CursorPositionAdapter { const position = EditorShareJsCodec.shareJsOffsetToRowColumn(offset, lines) return this.gotoLine(position.row + 1, position.column) } + + focus() { + this.editor.focus() + } } diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.js b/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.js index 663e163ad3..3f49ebc873 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.js @@ -113,6 +113,7 @@ export default CursorPositionManager = class CursorPositionManager { } const pos = this.localStorage(`doc.position.${this.doc_id}`) || {} this.adapter.setCursor(pos) - return this.adapter.setEditorScrollPosition(pos) + this.adapter.setEditorScrollPosition(pos) + this.adapter.focus() } }