From 98e4f27debcd7b454ad94c0b3f4d44e80c435fe8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 14 Mar 2023 14:49:46 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/7656 --- app/src/protyle/wysiwyg/keydown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 92f18cb1b..26dde8b60 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -525,7 +525,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { const selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select")); if (selectElements.length === 0) { const inlineElement = hasClosestByAttribute(range.startContainer, "data-type", null); - if (inlineElement) { + if (inlineElement && inlineElement.tagName === "SPAN") { const types = inlineElement.getAttribute("data-type").split(" "); if (types.length > 0) { protyle.toolbar.range = range;