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(docs-ui): select all and delete then enter bug (#3932)

Ran Luoe419e1b650ee
diff --git a/packages/docs-ui/src/commands/commands/break-line.command.ts b/packages/docs-ui/src/commands/commands/break-line.command.ts
index 590929e70c..ff86890ea3 100644
--- a/packages/docs-ui/src/commands/commands/break-line.command.ts
+++ b/packages/docs-ui/src/commands/commands/break-line.command.ts
@@ -119,6 +119,7 @@ export const BreakLineCommand: ICommand = {
const deleteRange = {
startOffset,
endOffset,
+ collapsed: startOffset === endOffset,
};
const result = await commandService.executeCommand(InsertCommand.id, {