From 3d20c32a3d13a14d0362566d95c0b2e5d811362e Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Wed, 14 Oct 2015 00:16:42 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E3=83=89=E3=83=A9=E3=83=83=E3=82=B0&=E3=83=89=E3=83=AD?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=81=97=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=AB?= =?UTF-8?q?mainWindow=E3=81=AEwebContents=E3=82=92=E9=81=B7=E7=A7=BB?= =?UTF-8?q?=E3=81=95=E3=81=9B=E3=81=9A=E3=80=81WebView=E3=81=AE=E3=81=BF?= =?UTF-8?q?=E3=81=8C=E5=87=A6=E7=90=86=E3=82=92=E5=AE=9F=E8=A1=8C=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.js b/main.js index 9f9a612e..1f84efcc 100644 --- a/main.js +++ b/main.js @@ -74,4 +74,10 @@ app.on('ready', function() { // when you should delete the corresponding element. mainWindow = null; }); + + // Deny drag&drop navigation in mainWindow. + // Drag&drop is allowed in webview of index.html. + mainWindow.webContents.on('will-navigate', function(event, url){ + event.preventDefault(); + }); });