diff --git a/packages/docs-ui/src/controllers/render-controllers/doc-selection-render.controller.ts b/packages/docs-ui/src/controllers/render-controllers/doc-selection-render.controller.ts index b816f0bbc56..89a51d50e31 100644 --- a/packages/docs-ui/src/controllers/render-controllers/doc-selection-render.controller.ts +++ b/packages/docs-ui/src/controllers/render-controllers/doc-selection-render.controller.ts @@ -165,6 +165,9 @@ export class DocSelectionRenderController extends Disposable implements IRenderM const { offsetX, offsetY } = evt; setTimeout(() => { + if (unitId === this._editorService.getFocusId()) { + return; + } this._setEditorFocus(unitId); this._docSelectionRenderService.setCursorManually(offsetX, offsetY); }, 0);