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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(editor): short key error and normal range show (#1688)
Univer571ec0b17f80
diff --git a/packages/sheets-formula/src/controllers/prompt.controller.ts b/packages/sheets-formula/src/controllers/prompt.controller.tsindex c6acaf9e59..05558730d2 100644--- a/packages/sheets-formula/src/controllers/prompt.controller.ts+++ b/packages/sheets-formula/src/controllers/prompt.controller.ts@@ -361,6 +361,7 @@ export class PromptController extends Disposable {this._editorService.closeRangePrompt$.subscribe(() => {if (!this._editorService.getSpreadsheetFocusState() || !this._formulaPromptService.isLockedSelectionInsert()) {this._closeRangePrompt();+ this._selectionManagerService.changePlugin(NORMAL_SELECTION_PLUGIN_NAME);}}));diff --git a/packages/ui/src/services/editor/editor.service.ts b/packages/ui/src/services/editor/editor.service.tsindex 2c56fc4543..3beb5c12cf 100644--- a/packages/ui/src/services/editor/editor.service.ts+++ b/packages/ui/src/services/editor/editor.service.ts@@ -379,13 +379,14 @@ export class EditorService extends Disposable implements IEditorService, IDisposcloseRangePrompt() {const documentDataModel = this._currentUniverService.getCurrentUniverDocInstance();const editorUnitId = documentDataModel.getUnitId();- if (!this.isEditor(editorUnitId) || this.isSheetEditor(editorUnitId)) {- return;- }this._contextService.setContextValue(EDITOR_ACTIVATED, false);this._contextService.setContextValue(FOCUSING_EDITOR_STANDALONE, false);+ if (!this.isEditor(editorUnitId) || this.isSheetEditor(editorUnitId)) {+ return;+ }+this.changeSpreadsheetFocusState(false);this.blur();@@ -454,6 +455,8 @@ export class EditorService extends Disposable implements IEditorService, IDisposthis._closeRangePrompt$.next(null);this.singleSelection(false);this.setFocusId(null);+ this._contextService.setContextValue(EDITOR_ACTIVATED, false);+ this._contextService.setContextValue(FOCUSING_EDITOR_STANDALONE, false);}this.getAllEditor().forEach((editor) => {