From bc0823a8728f23ad956d21d414713545d5c4de04 Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Fri, 15 Jul 2022 15:47:10 +0800 Subject: [PATCH] fix: ace editor auto focus after insert script --- .../browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts b/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts index 4b1649c5d..df8da006f 100644 --- a/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts +++ b/src/workbench/browser/src/app/eoui/editor/eo-editor/eo-editor.component.ts @@ -215,5 +215,6 @@ export class EoEditorComponent implements AfterViewInit, OnInit, OnChanges { const ace = this.aceRef.directiveRef.ace(); const cursorPos = ace.getCursorPosition(); ace.session.insert(cursorPos, code); + ace.focus(); } }