Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/9175

Vanessa946295913df5
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index cf04016428..c3fc9ec2e5 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -96,6 +96,16 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (!nodeElement) {
return;
}
+
+ // https://ld246.com/article/1694506408293
+ const endElement = hasClosestBlock(range.endContainer);
+ if (!matchHotKey("⌘C", event) && endElement && !nodeElement.isSameNode(endElement)) {
+ event.stopPropagation();
+ event.preventDefault();
+ console.log(event);
+ return;
+ }
+
if (nodeElement.classList.contains("av")) {
if (matchHotKey("⌘B", event) || matchHotKey("⌘I", event) || matchHotKey("⌘U", event)) {
event.preventDefault();