Browse Source

Added script fix

pull/2230/head
mxb 6 years ago
parent
commit
8f30ec7b8d
  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