diff --git a/lib/gui/etcher.js b/lib/gui/etcher.js index c36dbc3a..c35cfc38 100644 --- a/lib/gui/etcher.js +++ b/lib/gui/etcher.js @@ -74,6 +74,16 @@ electron.app.on('ready', () => { electron.globalShortcut.unregisterAll(); }); + // Prevent the user from being allowed to zoom-in the application. + // + // This function should be called on the renderer process. We use + // `executeJavaScript()` rather than moving this to a file in the + // renderer process for convenience, since we have all other + // electron desktop experience fixes in this file. + // + // See https://github.com/electron/electron/issues/3609 + mainWindow.webContents.executeJavaScript('require(\'electron\').webFrame.setZoomLevelLimits(1, 1);'); + // Prevent external resources from being loaded (like images) // when dropping them on the WebView. // See https://github.com/electron/electron/issues/5919