   setup ->
     stubSettings "filterLinkHints", true
     stubSettings "linkHintNumbers", "0123456789"
+    stub window, "windowIsFocused", -> true
 
   context "Text hints",
 

    initializeModeState()
    stubSettings "filterLinkHints", false
    stubSettings "linkHintCharacters", "ab"

    # Three hints will trigger double hint chars.
    createLinks 3

    document.getElementById("test-div").innerHTML = testContent
    stubSettings "filterLinkHints", true
    stubSettings "linkHintNumbers", "12"
    stub window, "windowIsFocused", -> true

  tearDown ->
    document.getElementById("test-div").innerHTML = ""
