From 2a5438d6368a0bb2bdfb9e5e41a7ecf042876b4d Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 28 Feb 2020 11:42:08 +0000 Subject: [PATCH] Revert "Remove will-navigate comment after Electron fix" This reverts commit 749d7e8e4c33b2c92832f25a45650a38781937cd. --- electron_app/src/webcontents-handler.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/electron_app/src/webcontents-handler.js b/electron_app/src/webcontents-handler.js index bbfb2e7da7..c95869007f 100644 --- a/electron_app/src/webcontents-handler.js +++ b/electron_app/src/webcontents-handler.js @@ -174,6 +174,18 @@ function onEditableContextMenu(ev, params) { module.exports = (webContents) => { webContents.on('new-window', onWindowOrNavigate); + // XXX: The below now does absolutely nothing because of + // https://github.com/electron/electron/issues/8841 + // Whilst this isn't a security issue since without + // node integration and with the sandbox, it should be + // no worse than opening the site in Chrome, it obviously + // means the user has to restart Riot to make it usable + // again (often unintuitive because it minimises to the + // system tray). We therefore need to be vigilant about + // putting target="_blank" on links in Riot (although + // we should generally be doing this anyway since links + // navigating you away from Riot in the browser is + // also annoying). webContents.on('will-navigate', onWindowOrNavigate); webContents.on('context-menu', function(ev, params) {