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/siyuan/issues/10609

Vanessad45741e33f32
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index 5354269bcd..b9cd770712 100644
--- a/app/src/protyle/render/av/action.ts
+++ b/app/src/protyle/render/av/action.ts
@@ -61,6 +61,19 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
return true;
}
+ const viewItemElement = hasClosestByClassName(event.target, "item");
+ if (viewItemElement && viewItemElement.parentElement.classList.contains("layout-tab-bar")) {
+ if (viewItemElement.classList.contains("item--focus")) {
+ openViewMenu({protyle, blockElement, element: viewItemElement});
+ } else {
+ blockElement.removeAttribute("data-render");
+ avRender(blockElement, protyle, undefined, viewItemElement.dataset.id);
+ }
+ event.preventDefault();
+ event.stopPropagation();
+ return true;
+ }
+
if (protyle.disabled) {
return false;
@@ -267,16 +280,6 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
event.preventDefault();
event.stopPropagation();
return true;
- } else if (target.classList.contains("item") && target.parentElement.classList.contains("layout-tab-bar")) {
- if (target.classList.contains("item--focus")) {
- openViewMenu({protyle, blockElement, element: target});
- } else {
- blockElement.removeAttribute("data-render");
- avRender(blockElement, protyle, undefined, target.dataset.id);
- }
- event.preventDefault();
- event.stopPropagation();
- return true;
}
target = target.parentElement;
}