From 09fb905764bb9aec31b90110b344d58662d4c003 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 10 Aug 2024 17:33:44 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/12149 --- app/src/protyle/wysiwyg/keydown.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index ebfc727a5..cea74a41d 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -890,7 +890,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { event.preventDefault(); return; } - if (position.start === 1 && !inlineElement && editElement.textContent.startsWith(Constants.ZWSP)) { + if (position.start === 1 && !inlineElement && editElement.textContent.startsWith(Constants.ZWSP) && + // https://github.com/siyuan-note/siyuan/issues/12149 + editElement.textContent.length > 1) { setFirstNodeRange(editElement, range); removeBlock(protyle, nodeElement, range, "Backspace"); event.stopPropagation();