From 03b3de4d16c69e7804dfa22274ecf918ec5cfc39 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 1 Jul 2023 20:48:44 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/7536 --- app/src/protyle/render/av/render.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index aeed7a3b2..c8bbcb203 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -101,7 +101,12 @@ export const avRender = (element: Element, cb?: () => void) => { } }; +let lastparentID:string export const refreshAV = (protyle: IProtyle, operation: IOperation) => { + if (lastparentID === operation.parentID) { + return + } + lastparentID = operation.parentID; if (operation.action === "addAttrViewCol") { Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.parentID}"]`)).forEach((item: HTMLElement) => { item.removeAttribute("data-render");