From 40976eb2e6829587265ccc90c2159dd990bf8312 Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Wed, 8 Dec 2021 23:44:20 +0530 Subject: chore: use 'nativeWindowOpen' to see if this resolves issues with opening browser window on clicking links (#2308) (based on https://github.com/TheGoddessInari/hamsket/commit/27226145f7ac0c5acf7aa13e6c8b26687b4e1013) --- recipes | 2 +- src/components/services/content/ServiceWebview.js | 2 +- src/index.ts | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/recipes b/recipes index a06050820..1e1f9ecc5 160000 --- a/recipes +++ b/recipes @@ -1 +1 @@ -Subproject commit a060508200794223adf50be6f7bc82e237033c69 +Subproject commit 1e1f9ecc53121749bc99a46bb5aecca51325836f diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index 713a0c21d..12aaf70b7 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js @@ -109,7 +109,7 @@ class ServiceWebview extends Component { nodeintegration webpreferences={`spellcheck=${ isSpellcheckerEnabled ? 1 : 0 - }, contextIsolation=1, enableRemoteModule=1`} + }, contextIsolation=1, nativeWindowOpen=1, enableRemoteModule=1`} /> ); } diff --git a/src/index.ts b/src/index.ts index 4b21c6b2b..d46641fe1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -213,6 +213,7 @@ const createWindow = () => { contextIsolation: false, webviewTag: true, preload: join(__dirname, 'sentry.js'), + nativeWindowOpen: true, // @ts-expect-error Object literal may only specify known properties, and 'enableRemoteModule' does not exist in type 'WebPreferences'. enableRemoteModule: true, }, @@ -519,9 +520,7 @@ ipcMain.on('open-browser-window', (_e, { url, serviceId }) => { fullscreenable: false, webPreferences: { session: serviceSession, - // TODO: Aren't these needed here? - // contextIsolation: false, - // enableRemoteModule: true, + nativeWindowOpen: true, }, }); child.show(); -- cgit v1.2.3-54-g00ecf