From 04413c81eb67c9dd607e92d9ff83f3048a327ca5 Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Fri, 6 Aug 2021 17:35:06 -0300 Subject: [PATCH] Fixed exit on Master Password screen Fixes #3072 --- electron/main.js | 5 +++-- masterpassword.html | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/electron/main.js b/electron/main.js index f0def0f7c..749a813a6 100644 --- a/electron/main.js +++ b/electron/main.js @@ -1,6 +1,6 @@ 'use strict'; -const {app, protocol, BrowserWindow, dialog, shell, Menu, ipcMain, nativeImage, session} = require('electron'); +const {app, BrowserWindow, shell, Menu, ipcMain, nativeImage, session} = require('electron'); // Tray const tray = require('./tray'); // AutoLaunch @@ -233,7 +233,8 @@ function createMasterPasswordWindow() { backgroundColor: '#0675A0' ,frame: false ,webPreferences: { - nodeIntegration: true + nodeIntegration: true + ,enableRemoteModule: true } }); // Open the DevTools. diff --git a/masterpassword.html b/masterpassword.html index 095fc4338..9b4179f7c 100644 --- a/masterpassword.html +++ b/masterpassword.html @@ -17,15 +17,15 @@ function handlePaste(e) { var clipboardData, pastedData; - // Stop data actually being pasted into div - e.stopPropagation(); - e.preventDefault(); + // Stop data actually being pasted into div + e.stopPropagation(); + e.preventDefault(); - // Get pasted data via clipboard API - clipboardData = e.clipboardData || window.clipboardData; + // Get pasted data via clipboard API + clipboardData = e.clipboardData || window.clipboardData; pastedData = clipboardData.getData('Text'); document.getElementsByTagName('input')[0].value += pastedData - // Do whatever with pasteddata + // Do whatever with pasteddata } function doValidate(e, value) { document.getElementById('wrong-pass').style.visibility = 'hidden'