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(sheets-ui): formula editor can't exit (#2858)

zhangweb3c0dde7e4e
diff --git a/packages/sheets-ui/src/controllers/editor/editing.render-controller.ts b/packages/sheets-ui/src/controllers/editor/editing.render-controller.ts
index 7b4406ae59..d6902cb666 100644
--- a/packages/sheets-ui/src/controllers/editor/editing.render-controller.ts
+++ b/packages/sheets-ui/src/controllers/editor/editing.render-controller.ts
@@ -181,7 +181,7 @@ export class EditingRenderController extends Disposable implements IRenderModule
this.disposeWithMe(this._editorBridgeService.visible$
.pipe(distinctUntilChanged((prev, curr) => prev.visible === curr.visible))
.subscribe((param) => {
- if (param.unitId === this._context.unitId && param.visible) {
+ if ((param.unitId === DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY || param.unitId === this._context.unitId) && param.visible) {
this._isUnitEditing = true;
this._handleEditorVisible(param);
} else if (this._isUnitEditing) {