From a83b9ee1141175d452596e37118af768ce7c9175 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 2 Jun 2025 22:51:00 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14955 --- app/src/protyle/wysiwyg/transaction.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 7d2fb60f4..018c0a496 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -621,7 +621,8 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: }, 450); } }); - const attrElement = item.querySelector(".protyle-attr"); + const attrElements = item.querySelectorAll(".protyle-attr"); + const attrElement = attrElements[attrElements.length - 1]; if (data.new["custom-avs"] && !data.new["av-names"]) { nodeAttrHTML += attrElement.querySelector(".protyle-attr--av")?.outerHTML || ""; }