Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix: only editing need to scroll to selection (#1455)

Ran Luo5296f32128d2
diff --git a/packages/engine-render/src/components/docs/text-selection-render-manager.ts b/packages/engine-render/src/components/docs/text-selection-render-manager.ts
index a8d6d0ea27..db57b4a33b 100644
--- a/packages/engine-render/src/components/docs/text-selection-render-manager.ts
+++ b/packages/engine-render/src/components/docs/text-selection-render-manager.ts
@@ -300,7 +300,9 @@ export class TextSelectionRenderManager extends RxDisposable implements ITextSel
this._updateInputPosition();
- this._scrollToSelection();
+ if (isEditing) {
+ this._scrollToSelection();
+ }
}
// Sync canvas selection to dom selection.