   focus: ->
     return if this.checkFocus()
     @root.focus()
-    if !this.getNativeRange() && @range?
-      this.setRange(@range)
+    this.setRange(@savedRange)
 
   getBounds: (index) ->
     pos = @doc.findPath(index).pop()

      # setRange(null) will fail to blur in IE10/11 on Travis+SauceLabs (but not local VMs)
      document.body.focus() if dom.isIE(11) and !dom.isIE(9)

  setRange: (range, source) ->
    convert = (index) =>
      pos = @doc.findPath(index).pop() # TODO inclusive
      if pos.blot instanceof Parchment.Embed

        this.setNativeRange(startNode, startOffset, endNode, endOffset)
    else
      this.setNativeRange(null)
    this.update()

  update: (args...) ->
    oldRange = @lastRange
    @lastRange = this.getRange()
    @savedRange = @lastRange if @lastRange?
    return if oldRange == @lastRange
    if oldRange == null || @lastRange == null || oldRange.start != @lastRange.start || oldRange.end != @lastRange.end
      this.onUpdate(@lastRange, args...)


module.exports = Selection
