From d7979f485b24b1199069855c9427ab83cb299bfa Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 23 Jun 2025 10:21:37 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14012 --- app/src/protyle/wysiwyg/index.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 6d3d7f144..bad421417 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -562,12 +562,14 @@ export class WYSIWYG { showMessage(window.siyuan.languages.crossKeepLazyLoad); } selectElements.forEach(item => { - item.classList.add("protyle-wysiwyg--select"); - ids.push(item.getAttribute("data-node-id")); - // 清除选中的子块 https://ld246.com/article/1667826582251 - item.querySelectorAll(".protyle-wysiwyg--select").forEach(subItem => { - subItem.classList.remove("protyle-wysiwyg--select"); - }); + if (!hasClosestByClassName(currentElement, "protyle-wysiwyg--select")) { + item.classList.add("protyle-wysiwyg--select"); + ids.push(item.getAttribute("data-node-id")); + // 清除选中的子块 https://ld246.com/article/1667826582251 + item.querySelectorAll(".protyle-wysiwyg--select").forEach(subItem => { + subItem.classList.remove("protyle-wysiwyg--select"); + }); + } }); countBlockWord(ids); if (toDown) { @@ -577,6 +579,7 @@ export class WYSIWYG { } } } + event.preventDefault(); return; }