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(docs-ui): select all on empty doc (#4787)
ZhangWeid85a0db73fda
diff --git a/packages/docs-ui/src/commands/commands/doc-select-all.command.ts b/packages/docs-ui/src/commands/commands/doc-select-all.command.tsindex 3c7f76c766..6168b22079 100644--- a/packages/docs-ui/src/commands/commands/doc-select-all.command.ts+++ b/packages/docs-ui/src/commands/commands/doc-select-all.command.ts@@ -41,7 +41,10 @@ export const DocSelectAllCommand: ICommand<ISelectAllCommandParams> = {return false;}- const { tables = [] } = body;+ const { tables = [], dataStream } = body;+ if (dataStream === '\r\n') {+ return true;+ }const textRanges: ISuccinctDocRangeParam[] = [];let offset = 0;