This commit is contained in:
Vanessa 2022-07-30 22:42:47 +08:00
parent 6926921503
commit 6e70225382

View file

@ -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;
}