mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
Bugfix: replace deprecated new-window with setWindowOpenHandler (#2293)
Co-authored-by: k9ert <k9ert@gmx.de>
This commit is contained in:
parent
6a4829e22c
commit
5e988626fd
1 changed files with 5 additions and 4 deletions
|
|
@ -364,10 +364,11 @@ function initMainWindow() {
|
|||
webPreferences
|
||||
})
|
||||
|
||||
mainWindow.webContents.on('new-window', function(e, url) {
|
||||
e.preventDefault();
|
||||
shell.openExternal(url);
|
||||
});
|
||||
// Ensures that any links with target="_blank" or window.open() will be opened in the user's default browser instead of within the app
|
||||
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
|
||||
shell.openExternal(url)
|
||||
return { action: 'deny' }
|
||||
})
|
||||
|
||||
mainWindow.on('close', function (event) {
|
||||
if(platformName == 'win64') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue