Put the hidden input component on its own layer

This avoids combining its repaint with the scrollbar's cursor position
when the cursor moves.
This commit is contained in:
Nathan Sobo
2014-04-21 17:20:50 -06:00
parent c730e3c67e
commit 68d74e7de0

View File

@@ -21,6 +21,9 @@ EditorScrollViewComponent = React.createClass
{cursorBlinkPeriod, cursorBlinkResumeDelay, cursorsMoved, onInputFocused, onInputBlurred} = @props
if @isMounted()
inputStyle = @getHiddenInputPosition()
inputStyle.WebkitTransform = 'translateZ(0)'
contentStyle =
height: scrollHeight
minWidth: scrollWidth
@@ -30,7 +33,7 @@ EditorScrollViewComponent = React.createClass
InputComponent
ref: 'input'
className: 'hidden-input'
style: @getHiddenInputPosition()
style: inputStyle
onInput: @onInput
onFocus: onInputFocused
onBlur: onInputBlurred