Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/14012

Vanessad7979f485b24
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 6d3d7f1440..bad4214170 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -562,12 +562,14 @@ export class WYSIWYG {
showMessage(window.siyuan.languages.crossKeepLazyLoad);
}
selectElements.forEach(item => {
- item.classList.add("protyle-wysiwyg--select");
- ids.push(item.getAttribute("data-node-id"));
- // 清除选中的子块 https://ld246.com/article/1667826582251
- item.querySelectorAll(".protyle-wysiwyg--select").forEach(subItem => {
- subItem.classList.remove("protyle-wysiwyg--select");
- });
+ if (!hasClosestByClassName(currentElement, "protyle-wysiwyg--select")) {
+ item.classList.add("protyle-wysiwyg--select");
+ ids.push(item.getAttribute("data-node-id"));
+ // 清除选中的子块 https://ld246.com/article/1667826582251
+ item.querySelectorAll(".protyle-wysiwyg--select").forEach(subItem => {
+ subItem.classList.remove("protyle-wysiwyg--select");
+ });
+ }
});
countBlockWord(ids);
if (toDown) {
@@ -577,6 +579,7 @@ export class WYSIWYG {
}
}
}
+ event.preventDefault();
return;
}