Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/insider/issues/1113

Vanessa63bff4981506
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index eb03931c3d..dcf2f8bffa 100644
--- a/app/src/protyle/render/av/action.ts
+++ b/app/src/protyle/render/av/action.ts
@@ -180,7 +180,8 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a
rowElement.querySelector(".av__firstcol use").setAttribute("xlink:href", "#iconCheck");
const rowIds: string[] = [];
const blockIds: string[] = [];
- blockElement.querySelectorAll(".av__row--select:not(.av__row--header )").forEach(item => {
+ const rowElements = blockElement.querySelectorAll(".av__row--select:not(.av__row--header)");
+ rowElements.forEach(item => {
rowIds.push(item.getAttribute("data-id"));
blockIds.push(item.querySelector(".av__cell").getAttribute("data-block-id"));
});
@@ -189,7 +190,7 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a
icon: "iconTrashcan",
label: window.siyuan.languages.delete,
click() {
- const previousElement = rowElement.previousElementSibling as HTMLElement;
+ const previousElement = rowElements[0].previousElementSibling as HTMLElement;
transaction(protyle, [{
action: "removeAttrViewBlock",
srcIDs: blockIds,
@@ -200,7 +201,9 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a
previousID: previousElement?.getAttribute("data-id") || "",
srcIDs: rowIds,
}]);
- rowElement.remove();
+ rowElements.forEach(item => {
+ item.remove();
+ });
updateHeader(previousElement);
}
});