From 0a53a789008690776e0a12ebbd82bb2934690d98 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 9 Jan 2025 12:03:37 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13627 --- app/src/layout/status.ts | 2 +- app/src/protyle/wysiwyg/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/layout/status.ts b/app/src/layout/status.ts index 5e9e091fe..a82fcbfd6 100644 --- a/app/src/layout/status.ts +++ b/app/src/layout/status.ts @@ -163,7 +163,7 @@ export const countBlockWord = (ids: string[], rootID?: string, clearCache = fals if (document.getElementById("status").classList.contains("fn__none")) { return; } - if (getSelection().rangeCount > 0 && getSelection().getRangeAt(0).toString()) { + if (getSelection().rangeCount > 0 && getSelection().getRangeAt(0).toString() && ids.length === 0) { countSelectWord(getSelection().getRangeAt(0)); return; } diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 776a2225e..a496d3c68 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -2118,7 +2118,7 @@ export class WYSIWYG { if (event.eventPhase !== 3 && !event.shiftKey && (event.key.indexOf("Arrow") > -1 || event.key === "Home" || event.key === "End" || event.key === "PageUp" || event.key === "PageDown") && !event.isComposing) { if (nodeElement) { this.setEmptyOutline(protyle, nodeElement); - if (range.toString() === "") { + if (range.toString() === "" && !nodeElement.classList.contains("protyle-wysiwyg--select")) { countSelectWord(range, protyle.block.rootID); } if (protyle.breadcrumb) {