From 4294febb012db6b19cd6a84c03ac79fee8c4bfe5 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 6 Feb 2026 18:59:12 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/pull/16937 --- app/src/protyle/wysiwyg/keydown.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index ef48a4021..2165e82b9 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1876,25 +1876,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } if (!event.shiftKey) { - const inlineElement = range.startContainer.parentElement; - const currentTypes = protyle.toolbar.getCurrentType(range); - // https://github.com/siyuan-note/siyuan/issues/14703 - if (currentTypes.length > 0 && range.toString() === "" && range.startOffset === 0 && - inlineElement.tagName === "SPAN" && !hasPreviousSibling(range.startContainer) && !hasPreviousSibling(inlineElement)) { - range.setStartBefore(inlineElement); - range.collapse(true); - } else if (inlineElement.tagName === "SPAN" && - !currentTypes.includes("search-mark") && // https://github.com/siyuan-note/siyuan/issues/7586 - !currentTypes.includes("code") && // https://github.com/siyuan-note/siyuan/issues/13871 - !currentTypes.includes("kbd") && - !currentTypes.includes("tag") && - range.toString() === "" && range.startContainer.nodeType === 3 && - (currentTypes.includes("inline-memo") || currentTypes.includes("block-ref") || currentTypes.includes("file-annotation-ref") || currentTypes.includes("a")) && - !hasNextSibling(range.startContainer) && range.startContainer.textContent.length === range.startOffset - ) { - range.setEndAfter(inlineElement); - range.collapse(false); - } document.execCommand("insertText", false, window.siyuan.config.editor.codeTabSpaces === 0 ? "\t" : "".padStart(window.siyuan.config.editor.codeTabSpaces, " ")); return true; }