Skip to content

Commit

Permalink
🎨 fix #12149
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Aug 10, 2024
1 parent 1091952 commit 09fb905
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/protyle/wysiwyg/keydown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 09fb905

Please sign in to comment.