       keypress: @onKeyPressInMode.bind this, hintMarkers
 
     @hintMode.onExit (event) =>
-      if event?.type == "click" or (event?.type == "keydown" and KeyboardUtils.isEscape event) or
-          (event?.type == "keydown" and event.keyCode in [ keyCodes.backspace, keyCodes.deleteKey ])
-        HintCoordinator.sendMessage "deactivate"
+      HintCoordinator.sendMessage "deactivate" if event?.type == "click" or (event?.type == "keydown" and
+        (KeyboardUtils.isEscape(event) or event.keyCode in [keyCodes.backspace, keyCodes.deleteKey]))
 
     @setOpenLinkMode mode, false
 

      marker = DomUtils.createElement "div"
      marker.className = "vimiumReset internalVimiumHintMarker vimiumHintMarker"
      marker.stableSortCount = ++stableSortCount
      # Extract other relevant fields from the hint descriptor. TODO(smblott) The name "link" here is misleading.
      extend marker,
        {hintDescriptor: link, linkText: link.linkText, showLinkText: link.showLinkText, rect: link.rect}


    # because some clickable elements cannot contain children, e.g. submit buttons.
    @hintMarkerContainingDiv = DomUtils.addElementList hintMarkers,
      id: "vimiumHintMarkerContainer", className: "vimiumReset"
    @hideMarker hintMarker for hintMarker in hintMarkers when hintMarker.hintDescriptor.frameId != frameId
    @updateKeyState = @updateKeyState.bind this, hintMarkers # TODO(smblott): This can be refactored out.

  setOpenLinkMode: (@mode, shouldPropagateToOtherFrames = true) ->
