 class FindMode extends Mode
   constructor: (@options = {}) ->
     # Save the selection, so performFindInPlace can restore it.
-    findModeSaveSelection()
+    @initialRange = getCurrentRange()
     window.findModeQuery = rawQuery: ""
     if @options.returnToViewport
       @scrollX = window.scrollX

    selection.collapseToStart() if selection.type == "Range"
    selection.getRangeAt 0

findModeSaveSelection = ->
  findModeInitialRange = getCurrentRange()

findModeRestoreSelection = (range = findModeInitialRange) ->
  selection = getSelection()
  selection.removeAllRanges()
  selection.addRange range

window.findMode = null
window.findModeQueryHasResults = false
findModeAnchorNode = null
isShowingHelpDialog = false
keyPort = null
isEnabledForUrl = true
