From f28ce5a3b7fcfa5facd8bec86f6056586aef79d0 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 28 Aug 2023 23:26:02 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9063 --- app/src/protyle/wysiwyg/transaction.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 1df7e4217..eb62ff5ec 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -333,7 +333,7 @@ const deleteBlock = (updateElements: Element[], id: string, protyle: IProtyle) = }); } -const updateBlock = (updateElements: Element[], protyle: IProtyle, operation: IOperation) => { +const updateBlock = (updateElements: Element[], protyle: IProtyle, operation: IOperation, focus: boolean) => { updateElements.forEach(item => { item.outerHTML = operation.data; }); @@ -444,7 +444,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b } if (operation.action === "update") { if (updateElements.length > 0) { - updateBlock(updateElements, protyle, operation); + updateBlock(updateElements, protyle, operation, focus); } else { zoomOut({ protyle, @@ -457,7 +457,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b updateElements.push(item); } }); - updateBlock(updateElements, protyle, operation); + updateBlock(updateElements, protyle, operation, focus); } }); }