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: tab should not empty cell content (#477)

Ran Luo6b6bdf7b4189
diff --git a/packages/base-docs/src/doc-plugin.ts b/packages/base-docs/src/doc-plugin.ts
index 2131ec30ed..ff7c3bdb85 100644
--- a/packages/base-docs/src/doc-plugin.ts
+++ b/packages/base-docs/src/doc-plugin.ts
@@ -100,12 +100,6 @@ export class DocPlugin extends Plugin {
this._localeService.load({
enUS,
});
-
- // if (this._config.standalone) {
- // this.initCanvasView();
- // }
-
- // this._markDocAsFocused();
}
private _initializeCommands(): void {
@@ -217,11 +211,4 @@ export class DocPlugin extends Plugin {
] as Dependency[]
).forEach((d) => docInjector.add(d));
}
-
- // private _markDocAsFocused() {
- // if (this._config.standalone) {
- // const c = this._currentUniverService.getCurrentUniverDocInstance();
- // this._currentUniverService.focusUniverInstance(c.getUnitId());
- // }
- // }
}
diff --git a/packages/base-docs/src/services/clipboard/__test__/html-and-udm-convert.spec.ts b/packages/base-docs/src/services/clipboard/__test__/html-and-udm-convert.spec.ts
index 49e78bff79..e3f05f0bde 100644
--- a/packages/base-docs/src/services/clipboard/__test__/html-and-udm-convert.spec.ts
+++ b/packages/base-docs/src/services/clipboard/__test__/html-and-udm-convert.spec.ts
@@ -108,7 +108,7 @@ describe('test case in html and udm convert', () => {
it('should paste the case when convert udm to html', async () => {
const convertor = new UDMToHtmlService();
const html = await convertor.convert([body!]);
- console.log(html);
+
expect(html).toBe('<strong>hello</strong><strong><i>world</i></strong>');
});
});
diff --git a/packages/base-sheets/src/commands/operations/selection.operation.ts b/packages/base-sheets/src/commands/operations/selection.operation.ts
index 7d88c54f6d..4cc14f63f9 100644
--- a/packages/base-sheets/src/commands/operations/selection.operation.ts
+++ b/packages/base-sheets/src/commands/operations/selection.operation.ts
@@ -25,6 +25,7 @@ export const SetSelectionsOperation: IOperation<ISetSelectionsOperationParams> =
// }
selectionManagerService.replace(selections);
+
return true;
},
};
diff --git a/packages/sheets-plugin-formula-ui/src/controllers/prompt.controller.ts b/packages/sheets-plugin-formula-ui/src/controllers/prompt.controller.ts
index c5fd89f9df..9badc7a0b7 100644
--- a/packages/sheets-plugin-formula-ui/src/controllers/prompt.controller.ts
+++ b/packages/sheets-plugin-formula-ui/src/controllers/prompt.controller.ts
@@ -354,7 +354,7 @@ export class PromptController extends Disposable {
const selectionWithStyle: ISelectionWithStyle[] = [];
for (const refSelection of refSelections) {
- const { refIndex, themeColor, token } = refSelection;
+ const { themeColor, token } = refSelection;
const gridRange = deserializeRangeWithSheet(token);
@@ -393,7 +393,7 @@ export class PromptController extends Disposable {
const { unitId, sheetId } = current;
- this._selectionManagerService.setCurrentSelection({
+ this._selectionManagerService.setCurrentSelectionNotRefresh({
pluginName,
unitId,
sheetId,
diff --git a/packages/ui-plugin-sheets/src/commands/operations/cell-edit.operation.ts b/packages/ui-plugin-sheets/src/commands/operations/cell-edit.operation.ts
index d54f43aace..865b73dd08 100644
--- a/packages/ui-plugin-sheets/src/commands/operations/cell-edit.operation.ts
+++ b/packages/ui-plugin-sheets/src/commands/operations/cell-edit.operation.ts
@@ -23,5 +23,5 @@ export const SetCellEditVisibleOperation: IOperation<IEditorBridgeServiceVisible
export const SetCellEditVisibleArrowOperation: IOperation<IEditorBridgeServiceVisibleParam> = {
id: 'sheet.operation.set-cell-edit-visible-arrow',
type: CommandType.OPERATION,
- handler: (accessor, params) => true,
+ handler: () => true,
};
diff --git a/packages/ui-plugin-sheets/src/controllers/editor-bridge.controller.ts b/packages/ui-plugin-sheets/src/controllers/editor-bridge.controller.ts
index f3602c2111..b9c728c436 100644
--- a/packages/ui-plugin-sheets/src/controllers/editor-bridge.controller.ts
+++ b/packages/ui-plugin-sheets/src/controllers/editor-bridge.controller.ts
@@ -135,7 +135,7 @@ export class EditorBridgeController extends Disposable {
return;
}
- const { spreadsheet, scene, spreadsheetColumnHeader, spreadsheetLeftTopPlaceholder, spreadsheetRowHeader } =
+ const { spreadsheet, spreadsheetColumnHeader, spreadsheetLeftTopPlaceholder, spreadsheetRowHeader } =
sheetObject;
spreadsheet.onDblclickObserver.add(() => {
diff --git a/packages/ui-plugin-sheets/src/controllers/editor/start-edit.controller.ts b/packages/ui-plugin-sheets/src/controllers/editor/start-edit.controller.ts
index b34aabc4bd..9552d9a8cc 100644
--- a/packages/ui-plugin-sheets/src/controllers/editor/start-edit.controller.ts
+++ b/packages/ui-plugin-sheets/src/controllers/editor/start-edit.controller.ts
@@ -116,7 +116,7 @@ export class StartEditController extends Disposable {
return;
}
- const { position, documentLayoutObject, scaleX, scaleY } = param;
+ const { position, documentLayoutObject, scaleX } = param;
const editorObject = this._getEditorObject();