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

Vanessa4e13146e5e70
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 8efc527f1d..1970f44764 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -329,7 +329,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
return;
}
- if (event.shiftKey && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
+ if (isNotCtrl(event) && event.shiftKey && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
const selectElements = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select");
if (selectElements.length > 0) {
event.stopPropagation();
@@ -704,7 +704,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
} else {
// 修正光标上移至 \n 结尾的块时落点错误 https://github.com/siyuan-note/siyuan/issues/14443
const prevEditableElement = getContenteditableElement(previousElement) as HTMLElement;
- if (prevEditableElement && prevEditableElement.lastChild.nodeType === 3 &&
+ if (prevEditableElement && prevEditableElement.lastChild.nodeType === 3 &&
prevEditableElement.lastChild.textContent.endsWith("\n")) {
prevEditableElement.lastChild.textContent = prevEditableElement.lastChild.textContent.replace(/\n$/, "");
}