mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-08 17:17:56 +08:00
fix(focus): Focusing quickly enough can throw. Sentry #14942
This commit is contained in:
parent
7d92f72552
commit
24ca99e925
1 changed files with 1 additions and 1 deletions
|
@ -16,5 +16,5 @@ NylasEnv.startRootWindow()
|
||||||
# Workaround for focus getting cleared upon window creation
|
# Workaround for focus getting cleared upon window creation
|
||||||
windowFocused = ->
|
windowFocused = ->
|
||||||
window.removeEventListener('focus', windowFocused)
|
window.removeEventListener('focus', windowFocused)
|
||||||
setTimeout (-> document.getElementById('sheet-container').focus()), 0
|
setTimeout (-> document.getElementById('sheet-container')?.focus()), 0
|
||||||
window.addEventListener('focus', windowFocused)
|
window.addEventListener('focus', windowFocused)
|
||||||
|
|
Loading…
Reference in a new issue