From d2aec4865727b08329f0cd102048de7b40bb58ff Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 9 Sep 2024 23:40:32 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12205 1 --- app/src/protyle/wysiwyg/transaction.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 09af9c4bf..3a4665b9d 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -382,6 +382,14 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: item.remove(); }); }); + if (protyle.wysiwyg.element.childElementCount === 0) { + zoomOut({ + protyle, + id: protyle.block.rootID, + isPushBack: false, + focusId: operation.id, + }); + } } return; }