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/9018

Vanessa477df7aa7c57
diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts
index 73444ca5e2..8061be1de4 100644
--- a/app/src/block/popover.ts
+++ b/app/src/block/popover.ts
@@ -52,6 +52,10 @@ export const initBlockPopover = (app: App) => {
if (!getTarget(event, aElement)) {
return;
}
+ // https://github.com/siyuan-note/siyuan/issues/9007
+ if (event.relatedTarget && !document.contains(event.relatedTarget as Node)) {
+ return;
+ }
if (window.siyuan.ctrlIsPressed) {
clearTimeout(timeoutHide);
showPopover(app);
diff --git a/app/src/boot/globalShortcut.ts b/app/src/boot/globalShortcut.ts
index 9ee95317fe..94c07720c3 100644
--- a/app/src/boot/globalShortcut.ts
+++ b/app/src/boot/globalShortcut.ts
@@ -445,7 +445,8 @@ export const globalShortcut = (app: App) => {
if (!event.altKey && !event.shiftKey && isCtrl(event)) {
if (event.key === "Meta" || event.key === "Control" || event.ctrlKey || event.metaKey) {
window.siyuan.ctrlIsPressed = true;
- if (window.siyuan.config.editor.floatWindowMode === 1 && !event.repeat) {
+ if ((event.key === "Meta" || event.key === "Control") &&
+ window.siyuan.config.editor.floatWindowMode === 1 && !event.repeat) {
showPopover(app);
}
} else {