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

Vanessaa440d3768c80
diff --git a/app/electron/main.js b/app/electron/main.js
index d293d38386..63a150449d 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -1221,9 +1221,13 @@ app.on("activate", () => {
}
});
-// 在编辑器内打开链接的处理,比如 iframe 上的打开链接。
app.on("web-contents-created", (webContentsCreatedEvent, contents) => {
contents.setWindowOpenHandler((details) => {
+ // https://github.com/siyuan-note/siyuan/issues/10567
+ if (details.url.startsWith("file:///") && details.disposition === "foreground-tab") {
+ return;
+ }
+ // 在编辑器内打开链接的处理,比如 iframe 上的打开链接。
shell.openExternal(details.url);
return {action: "deny"};
});