From e420934530cc3cf61d6ea602dc0736f90ac45b4f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 9 Jul 2022 18:15:36 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/5386 --- app/src/protyle/wysiwyg/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 7b4457379..e548a76f0 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1289,10 +1289,7 @@ export class WYSIWYG { // 不可编辑的块处理 const nodeElement = hasClosestBlock(range.startContainer); if (nodeElement) { - if (isNotEditBlock(nodeElement) && !this.element.querySelector(".protyle-wysiwyg--select")) { - nodeElement.classList.add("protyle-wysiwyg--select"); - countBlockWord([nodeElement.getAttribute("data-node-id")]); - } else if (!nodeElement.classList.contains("protyle-wysiwyg--select")) { + if (!nodeElement.classList.contains("protyle-wysiwyg--select")) { countSelectWord(range); } this.setEmptyOutline(protyle, nodeElement);