Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: properly handle native & external url opening

thecodrrb4ef8660d2f7
diff --git a/apps/web/desktop/electron.js b/apps/web/desktop/electron.js
index cf23f5d96..eee14505f 100644
--- a/apps/web/desktop/electron.js
+++ b/apps/web/desktop/electron.js
@@ -42,7 +42,7 @@ async function createWindow() {
nodeIntegration: false, //true,
enableRemoteModule: false,
contextIsolation: true,
- nativeWindowOpen: false,
+ nativeWindowOpen: true,
spellcheck: false,
preload: __dirname + "/preload.js",
},
@@ -66,11 +66,8 @@ async function createWindow() {
});
mainWindow.webContents.setWindowOpenHandler((details) => {
- if (details.frameName === "_blank") {
- shell.openExternal(details.url);
- return { action: "deny" };
- }
- return { action: "allow" };
+ shell.openExternal(details.url);
+ return { action: "deny" };
});
nativeTheme.on("updated", () => {