From 9463185acfce48a9da4bcd661de737bd932b5c6e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 25 Sep 2023 09:43:31 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9259 --- app/src/protyle/wysiwyg/index.ts | 2 +- app/src/protyle/wysiwyg/keydown.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 1d885eefe..c96ce6010 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1001,8 +1001,8 @@ export class WYSIWYG { } } } + return; } - return; } if (selectElement.length > 0) { range.collapse(true); diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index faf41962e..44ddae95b 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 (isNotEditBlock(nodeElement) && matchHotKey("⌘C", event)) { + if (matchHotKey("⌘C", event)) { 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 (isNotEditBlock(nodeElement) && matchHotKey("⌘X", event)) { + if (matchHotKey("⌘X", event)) { let html = ""; nodeElement.classList.add("protyle-wysiwyg--select"); const selectElements = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select");