Skip to content

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

:bug: Correct Shift+Click selection below the editor https://github.com/siyuan-note/siyuan/issues/11960

Danielb7e876ed56e0
diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts
index 55dab3318f..704068fcc4 100644
--- a/app/src/protyle/ui/initUI.ts
+++ b/app/src/protyle/ui/initUI.ts
@@ -153,13 +153,16 @@ export const initUI = (protyle: IProtyle) => {
}, Constants.TIMEOUT_LOAD);
}, {passive: true});
protyle.contentElement.addEventListener("mousedown", (event: MouseEvent & { target: HTMLElement }) => {
- if (event.button !== 0 || !event.shiftKey || event.target !== protyle.contentElement) {
+ if (event.button !== 0 || !event.shiftKey) {
return;
}
const eventProtyleElement = hasClosestByClassName(event.target, "protyle", true);
if (eventProtyleElement && eventProtyleElement !== protyle.element) {
return;
}
+ if (hasClosestByClassName(event.target, "sy__backlink--bottom", true)) {
+ return;
+ }
const lastElement = protyle.wysiwyg.element.lastElementChild;
if (!lastElement || event.clientY <= lastElement.getBoundingClientRect().bottom) {
return;