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: text selection (#819)

Ran Luo13f4716ed4ce
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 5963484ae4..9ce8cc08e7 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
@@ -1036,7 +1036,8 @@ export class TextSelectionRenderManager extends RxDisposable implements ITextSel
if (bounds) {
const { left, top, right, bottom } = bounds.viewBound;
- if (anchor.strokeWidth < left || right < 0 || anchor.strokeWidth < top || bottom < 0) {
+ if (anchor.left < left || anchor.left > right || anchor.top < top || anchor.top > bottom) {
+ activeRangeInstance?.deactivateStatic();
return;
}
}