diff --git a/lib/gui/etcher.js b/lib/gui/etcher.js index 39608970..2dd873dd 100644 --- a/lib/gui/etcher.js +++ b/lib/gui/etcher.js @@ -81,6 +81,13 @@ electron.app.on('ready', function() { electron.globalShortcut.unregisterAll(); }); + // Prevent external resources from being loaded (like images) + // when dropping them on the WebView. + // See https://github.com/electron/electron/issues/5919 + mainWindow.webContents.on('will-navigate', function(event) { + event.preventDefault(); + }); + mainWindow.loadURL(`file://${path.join(__dirname, 'index.html')}`); }); });