diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 1ea5d30ff..c6039be32 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -355,7 +355,7 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => { id, data: blockElement.getAttribute("updated") }]); - nameElement.setAttribute("updated", newUpdated); + blockElement.setAttribute("updated", newUpdated); nameElement.dataset.title = newData; blockElement.querySelector(".layout-tab-bar .item__text").textContent = newData; }; diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 234344896..2676089a6 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -252,7 +252,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => { } else if (operation.action === "setAttrViewName") { Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.id}"]`)).forEach((item: HTMLElement) => { const titleElement = item.querySelector(".av__title") as HTMLElement; - if (!titleElement || titleElement.textContent.trim() === operation.data) { + if (!titleElement) { return; } titleElement.textContent = operation.data;