fix: prevent navigate to new url
This commit is contained in:
parent
1e1414d659
commit
3625eefec4
@ -52,6 +52,11 @@ function createWindow() {
|
|||||||
menu.popup()
|
menu.popup()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mainWindow.webContents.on('will-navigate', (event, url) => {
|
||||||
|
event.preventDefault()
|
||||||
|
shell.openExternal(url)
|
||||||
|
})
|
||||||
|
|
||||||
mainWindow.on('ready-to-show', () => {
|
mainWindow.on('ready-to-show', () => {
|
||||||
mainWindow.show()
|
mainWindow.show()
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user