Browse Source

Merge pull request #2230 from maxerbox/fix-input-bypass-lock

Fix input bypass
pull/2255/head
Ramiro Saenz 6 years ago committed by GitHub
parent
commit
7752c37a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      app/view/main/MainController.js

9
app/view/main/MainController.js

@ -373,6 +373,15 @@ Ext.define('Rambox.view.main.MainController', {
}
function setLock(text) {
var currentTab = Ext.cq1('app-main').getActiveTab();
if (currentTab.getWebView) { //related to https://github.com/ramboxapp/community-edition/issues/2065. Focusing in an sub frame is a workaround
currentTab.down('component').el.dom.executeJavaScript(`
var iframeFix = document.createElement('iframe');
document.body.appendChild(iframeFix);
iframeFix.focus();
document.body.removeChild(iframeFix);
`);
}
console.info('Lock Rambox:', 'Enabled');
// Save encrypted password in localStorage to show locked when app is reopen

Loading…
Cancel
Save