From 4e13146e5e70c2214586b54adb3979eb328b8d44 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 17 Apr 2025 23:43:58 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14638 --- app/src/protyle/wysiwyg/keydown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 8efc527f1..1970f4476 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$/, ""); }