From 178545d7db3a9bd59134c96c6c7a5a1217955d6f Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Wed, 14 Oct 2015 21:05:40 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=97=E3=83=AA=E5=86=85=E3=81=AE?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E9=81=B7=E7=A7=BB=E3=81=AF=E8=A8=B1?= =?UTF-8?q?=E5=8F=AF=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 1f84efcc..25b4cff9 100644 --- a/main.js +++ b/main.js @@ -78,6 +78,9 @@ app.on('ready', function() { // 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(); + var index = url.indexOf('file://' + __dirname); + if(index != 0){ + event.preventDefault(); + } }); });