From 6e702253828ce314af6b437322b8708e2d54eb15 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 30 Jul 2022 22:42:47 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5524 --- app/src/protyle/wysiwyg/transaction.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index fe432864f..3c0bff3b5 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -381,7 +381,12 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b if (operation.previousID) { let beforeElement: Element; Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.previousID}"]`)).find(item => { - if (!hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed")) { + const embedElement = hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed") + if (embedElement) { + // https://github.com/siyuan-note/siyuan/issues/5524 + embedElement.removeAttribute("data-render"); + blockRender(protyle, embedElement); + } else { beforeElement = item; return true; }