const webViewElement = document.querySelector('.messages-iframe');

webViewElement.addEventListener('new-window', (e) => {
    require('electron').shell.openExternal(e.url);
})

window.addEventListener('focus', () => webViewElement.focus());

const webViewElement = document.querySelector('.messages-iframe');

webViewElement.addEventListener('new-window', (e) => {
    require('electron').shell.openExternal(e.url);
})

window.addEventListener('focus', () => webViewElement.focus());
window.addEventListener('blur', () => webViewElement.blur());

Remove webview focus when parent window loses focus
Remove webview focus when parent window loses focus

This fixes desktop push notifications when the app is not active.
