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: fixed the issue that clicking on the switch sheet in the editing state is invalid (#5750)

wpxp1234566c1db1c467fb
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 89fddfaffe..b0a5969471 100644
--- a/packages/sheets-ui/src/controllers/editor/editing.render-controller.ts
+++ b/packages/sheets-ui/src/controllers/editor/editing.render-controller.ts
@@ -572,7 +572,9 @@ export class EditingRenderController extends Disposable {
}
// moveSelection need to put behind of SetRangeValuesCommand, fix https://github.com/dream-num/univer/issues/1155
- this._moveSelection(keycode, currentUnitId, worksheetId);
+ if (keycode !== undefined) {
+ this._moveSelection(keycode, currentUnitId, worksheetId);
+ }
}
private _getEditorObject() {