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/12230

Vanessaef8561cf1821
diff --git a/app/src/protyle/util/selection.ts b/app/src/protyle/util/selection.ts
index 09a768b362..50473ae690 100644
--- a/app/src/protyle/util/selection.ts
+++ b/app/src/protyle/util/selection.ts
@@ -538,6 +538,7 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
range.collapse(true);
setRange = true;
} else if (type === "NodeAttributeView") {
+ /// #if !MOBILE
const cursorElement = element.querySelector(".av__cursor");
if (cursorElement) {
range.setStart(cursorElement.firstChild, 0);
@@ -545,6 +546,9 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
} else {
return false;
}
+ /// #else
+ return false;
+ /// #endif
}
if (setRange) {
focusByRange(range);