Skip to content

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

:sparkles: fix https://github.com/siyuan-note/siyuan/issues/8880

Vanessa5dc4f657e951
diff --git a/app/src/menus/index.ts b/app/src/menus/index.ts
index e881ba325e..b8e0f9341d 100644
--- a/app/src/menus/index.ts
+++ b/app/src/menus/index.ts
@@ -18,6 +18,9 @@ export class Menus {
this.menu = new Menu();
/// #if !MOBILE
window.addEventListener("contextmenu", (event) => {
+ if (event.shiftKey) {
+ return;
+ }
let target = event.target as HTMLElement;
while (target && !target.parentElement.isEqualNode(document.querySelector("body"))) {
event.preventDefault();
diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts
index 700f72f927..bc3eaeb76f 100644
--- a/app/src/protyle/header/Title.ts
+++ b/app/src/protyle/header/Title.ts
@@ -187,6 +187,9 @@ export class Title {
}
});
this.element.addEventListener("contextmenu", (event) => {
+ if (event.shiftKey) {
+ return;
+ }
if (getSelection().rangeCount === 0) {
openTitleMenu(protyle, {x: event.clientX, y: event.clientY});
return;
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index e574a1c6d1..7e81a084cf 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -1235,6 +1235,9 @@ export class WYSIWYG {
let beforeContextmenuRange: Range;
this.element.addEventListener("contextmenu", (event: MouseEvent & { detail: any }) => {
+ if (event.shiftKey) {
+ return;
+ }
event.stopPropagation();
event.preventDefault();
const x = event.clientX || event.detail.x;