From 803ea935d610e7c5537f4a020158d655f50c0778 Mon Sep 17 00:00:00 2001 From: lancegin Date: Fri, 20 Oct 2017 11:02:35 +0800 Subject: [PATCH] fix: forbidden dragover event in the main window --- src/main/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/index.js b/src/main/index.js index 926a0e4..8228c87 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -121,6 +121,11 @@ function createWindow() { mainWindow = null; }); + // disable open a outer resource from a dragover event + mainWindow.webContents.on('will-navigate', (e) => { + e.preventDefault(); + }); + // icon in menu bar if (appIcon === null) { appIcon = new Tray(`${__static}/img/qboxTemplate.png`);