From 9aadfe304123ab8548eed54ed3cdf47a3de31033 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 9 Nov 2022 14:47:53 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6533 --- app/src/protyle/wysiwyg/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index c1fe00015..4bad0d34f 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1965,8 +1965,8 @@ export class WYSIWYG { item.removeAttribute("select-start"); item.removeAttribute("select-end"); }); - const ctrlParentElement = hasClosestByClassName(ctrlElement, "protyle-wysiwyg--select"); - if (ctrlParentElement && !ctrlElement.isSameNode(ctrlParentElement)) { + const ctrlParentElement = hasClosestByClassName(ctrlElement.parentElement, "protyle-wysiwyg--select"); + if (ctrlParentElement) { ctrlParentElement.classList.remove("protyle-wysiwyg--select"); ctrlParentElement.removeAttribute("select-start"); ctrlParentElement.removeAttribute("select-end");