 
   componentWillReceiveProps: (nextProps) =>
     if nextProps.initialSelectionSnapshot?
-      @_saveSelectionState(nextProps.initialSelectionSnapshot)
+      @_saveExportedSelection(nextProps.initialSelectionSnapshot)
 
   componentDidUpdate: =>
     @_restoreSelection()

  getCurrentSelection: => @innerState.exportedSelection ? {}
  getPreviousSelection: => @innerState.previousExportedSelection ? {}

  # Every time the cursor changes we need to save its location and state.
  #
  # When React re-renders it doesn't restore the Selection. We need to do
  # this manually with `_restoreSelection`

  #
  # We also need to keep references to the previous selection state in
  # order for undo/redo to work properly.
  _saveExportedSelection: (exportedSelection) =>
    return if (@innerState.exportedSelection?.isEqual(exportedSelection))

    @setInnerState
      exportedSelection: exportedSelection
      editableFocused: true
      previousExportedSelection: @innerState.exportedSelection

  # Every time the cursor changes we need to save its location and state.
  # We update our cache every time the selection changes by listening to
  # the `document` `selectionchange` event.
  _onSelectionChange: (event) =>
    selection = new ExtendedSelection(@_editableNode())
    return unless selection?.isInScope()
    @_saveExportedSelection(selection.exportSelection())

  _restoreSelection: =>
    return unless @_shouldRestoreSelection()
    @_teardownListeners()
    selection = new ExtendedSelection(@_editableNode())
    selection.importSelection(@innerState.exportedSelection)
    if selection.isInScope()
      @_onSelectionChanged(selection)
    @_setupListeners()

  _shouldRestoreSelection: ->
