Prevent window navigation
Navigation is the default handler for file drag and drop events on the window. // FREEBIE
This commit is contained in:
parent
601081c1b8
commit
84fba7d968
1 changed files with 4 additions and 1 deletions
5
main.js
5
main.js
|
@ -117,7 +117,10 @@ function createWindow () {
|
|||
if (protocol === 'http:' || protocol === 'https:') {
|
||||
shell.openExternal(url)
|
||||
}
|
||||
})
|
||||
});
|
||||
mainWindow.webContents.on('will-navigate', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Emitted when the window is about to be closed.
|
||||
mainWindow.on('close', function (e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue