Vanessa 2025-04-17 23:43:58 +08:00
parent 8ece62c075
commit 4e13146e5e

View File

@ -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$/, "");
}