Prevent window navigation

Navigation is the default handler for file drag and drop events on the
window.

// FREEBIE
This commit is contained in:
lilia
2017-04-24 20:58:01 -07:00
committed by Scott Nonnenberg
parent 601081c1b8
commit 84fba7d968

View File

@@ -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) {