Skip to content

Commit

Permalink
Fix #221
Browse files Browse the repository at this point in the history
IE seems unforgiving of double focuses
  • Loading branch information
jhchen committed Nov 6, 2014
1 parent 0cdacc2 commit 815fd32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/editor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ class Editor
@selection.update(source)

focus: ->
@selection.setRange(@selection.range)
@root.focus()
if @selection.range?
@selection.setRange(@selection.range)
else
@root.focus()

getDelta: ->
return @delta
Expand Down

0 comments on commit 815fd32

Please sign in to comment.