mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix: properly handle native & external url opening
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user