mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +00:00
fix: prevent user from zooming in the whole application (#534)
Turns out the user can zoom-in the whole application, which we didn't notice before. Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
parent
c6ef5edda3
commit
49d89b4ace
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user