Skip to content

Commit

Permalink
Freshen selection data instead of expecting a pre-input selection
Browse files Browse the repository at this point in the history
  • Loading branch information
javan committed Jun 16, 2016
1 parent 2b64e4d commit 39308a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trix/controllers/input_controller.coffee
Expand Up @@ -86,8 +86,9 @@ class Trix.InputController extends Trix.BasicObject
# by the extra <br> rendered to represent them.
if textDeleted is "\n" and unhandledDeletion
if textAdded and not unhandledAddition
Trix.selectionChangeObserver.update()
if range = @responder?.getSelectedRange()
if @responder?.positionIsBlockBreak(range[1] + textAdded.length)
if @responder?.positionIsBlockBreak(range[1])
unhandledDeletion = false

not (unhandledAddition or unhandledDeletion)
Expand Down

0 comments on commit 39308a6

Please sign in to comment.