mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
18 lines
524 B
JavaScript
18 lines
524 B
JavaScript
/* eslint import/first: 0 */
|
|
|
|
// Extend the standard promise class a bit
|
|
import './promise-extensions';
|
|
|
|
import AppEnvClass from './app-env';
|
|
window.AppEnv = new AppEnvClass();
|
|
AppEnv.startRootWindow();
|
|
|
|
// Workaround for focus getting cleared upon window creation
|
|
const windowFocused = () => {
|
|
window.removeEventListener('focus', windowFocused);
|
|
return setTimeout(() => {
|
|
const elt = document.getElementById('sheet-container');
|
|
if (elt) elt.focus();
|
|
}, 0);
|
|
};
|
|
window.addEventListener('focus', windowFocused);
|