From 7d57bd07e7cabd4acb598890b29420d9e5401838 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 15 Jan 2024 22:06:46 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/10188 --- 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 b3ab2c815..27708c3c5 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1375,7 +1375,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { event.preventDefault(); event.stopPropagation(); const selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select")); - if (selectsElement.length < 2) { + if (selectsElement.length < 2 || selectsElement[0]?.classList.contains("li")) { return; } turnsIntoOneTransaction({ @@ -1390,7 +1390,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { event.preventDefault(); event.stopPropagation(); const selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select")); - if (selectsElement.length < 2) { + if (selectsElement.length < 2 || selectsElement[0]?.classList.contains("li")) { return; } turnsIntoOneTransaction({