diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/dom_tests/dom_tests.coffee | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee index 0dd6e122..c3bdb9c5 100644 --- a/tests/dom_tests/dom_tests.coffee +++ b/tests/dom_tests/dom_tests.coffee @@ -31,8 +31,10 @@ for type in [ "keydown", "keypress", "keyup" ]  commandName = commandCount = null -# Some tests have side effects on the handler stack and the active mode, so these are reset on setup. +# Some tests have side effects on the handler stack and the active mode, so these are reset on setup.  Also, +# some tests affect the focus (e.g. Vomnibar tests), so we make sure the window has the focus.  initializeModeState = -> +  window.focus()    Mode.reset()    handlerStack.reset()    normalMode = installModes() | 
