Skip to content

Commit

Permalink
fix(editor): short key error and normal range show (#1688)
Browse files Browse the repository at this point in the history
  • Loading branch information
DR-Univer authored Mar 25, 2024
1 parent 117cbbe commit 571ec0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
})
);
Expand Down
9 changes: 6 additions & 3 deletions packages/ui/src/services/editor/editor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,14 @@ export class EditorService extends Disposable implements IEditorService, IDispos
closeRangePrompt() {
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();
Expand Down Expand Up @@ -454,6 +455,8 @@ export class EditorService extends Disposable implements IEditorService, IDispos
this._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) => {
Expand Down

0 comments on commit 571ec0b

Please sign in to comment.