Drop batchedUpdates on input since we're batching in the model anyway

This commit is contained in:
Nathan Sobo
2014-04-15 15:08:12 -06:00
parent 56e5fb7a63
commit 4fa9c64c2b

View File

@@ -1,5 +1,4 @@
React = require 'react'
ReactUpdates = require 'react/lib/ReactUpdates'
{div} = require 'reactionary'
InputComponent = require './input-component'
@@ -40,8 +39,11 @@ EditorScrollViewComponent = React.createClass
onInput: (char, replaceLastCharacter) ->
{editor} = @props
ReactUpdates.batchedUpdates ->
editor.selectLeft() if replaceLastCharacter
if replaceLastCharacter
editor.transact ->
editor.selectLeft()
editor.insertText(char)
else
editor.insertText(char)
onMouseDown: (event) ->