From 6652ac5352c65b99d4b144a1e305b397041fddd5 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 27 Jul 2022 00:42:14 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5521 --- app/src/protyle/wysiwyg/keydown.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 1ab8ccf44..a2d4eb7eb 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1372,7 +1372,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } - if (isNotEditBlock(nodeElement) && matchHotKey("⌘C", event)) { + if (isNotEditBlock(nodeElement) && + nodeElement.getAttribute("data-type") !== "NodeHTMLBlock" // HTML 块选中部分内容无法复制 https://github.com/siyuan-note/siyuan/issues/5521 + && matchHotKey("⌘C", event)) { let html = ""; protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach(item => { html += removeEmbed(item);