From 52773127d250b8f67f9cc62983815140e9b9feaf Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 27 Sep 2023 09:14:03 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/9283 --- app/src/protyle/wysiwyg/keydown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 44ddae95b..840915ad2 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1463,7 +1463,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } - if (matchHotKey("⌘C", event)) { + if (matchHotKey("⌘C", event) && selectText === "") { let html = ""; protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach(item => { html += removeEmbed(item); @@ -1475,7 +1475,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { } } - if (matchHotKey("⌘X", event)) { + if (matchHotKey("⌘X", event) && selectText === "") { let html = ""; nodeElement.classList.add("protyle-wysiwyg--select"); const selectElements = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select");