 
   # Scroll the focus into view.
   scrollIntoView: ->
-    unless @selection.type == "None"
+    if @selection.anchorNode
       elementWithFocus = DomUtils.getElementWithFocus @selection, @getDirection() == backward
       Scroller.scrollIntoView elementWithFocus if elementWithFocus
 

          # more likely to be interested in visible content.
          @selection.removeAllRanges()

      if @selection.type != "Range" and @name != "caret"
        new CaretMode
        HUD.showForDuration "No usable selection, entering caret mode...", 2500


    super extend options, name: "caret", indicator: "Caret mode", alterMethod: "move"

    # Establish the initial caret.
    if @selection.anchorNode
      @movement.collapseSelectionToAnchor()
    else
      @establishInitialSelectionAnchor()
      unless @selection.anchorNode
        @exit()
        HUD.showForDuration "Create a selection before entering visual mode.", 2500
        return

    @movement.extendByOneCharacter forward
    @movement.scrollIntoView()
