From 20c2f946f9005765609d20e5829443f967a7ece4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 19 Jan 2026 09:26:51 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16066 --- app/src/protyle/wysiwyg/keydown.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 39bab58e3..cf381b357 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -926,7 +926,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { if (nextSibling.nodeType === 1 && nextSibling.classList.contains("img")) { // 光标需在图片前 https://github.com/siyuan-note/siyuan/issues/12452 const textPosition = getSelectionOffset(range.startContainer, protyle.wysiwyg.element, range); - if (textPosition.start === range.startContainer.textContent.length) { + if (textPosition.start === range.startContainer.textContent.length || + (textPosition.start === 0 && range.startContainer.textContent === Constants.ZWSP)) { removeImage(nextSibling as Element, nodeElement, range, protyle); event.stopPropagation(); event.preventDefault();