From 8920697029b623fd41d80ce032666a12889ad168 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 19 Sep 2022 11:42:16 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/insider/issues/1056 --- app/src/protyle/toolbar/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 0e37d51be..6fcc8ce0f 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -507,6 +507,10 @@ export class Toolbar { this.range.setEnd(lastNewNode.lastChild, lastNewNode.lastChild.textContent.length); } else if (lastNewNode.nodeType === 3) { this.range.setEnd(lastNewNode, lastNewNode.textContent.length); + if (lastNewNode.textContent === Constants.ZWSP) { + // https://github.com/siyuan-note/insider/issues/1056 + this.range.collapse(false); + } } else { // eg: 表格中有3行时,选中第二行三级,多次加粗会增加换行 this.range.setEndAfter(lastNewNode);