From 68d74e7de0b981fcfc85609b82a0eebf3983f16f Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 21 Apr 2014 17:20:50 -0600 Subject: [PATCH] Put the hidden input component on its own layer This avoids combining its repaint with the scrollbar's cursor position when the cursor moves. --- src/editor-scroll-view-component.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/editor-scroll-view-component.coffee b/src/editor-scroll-view-component.coffee index 7404a36b5..516798b1c 100644 --- a/src/editor-scroll-view-component.coffee +++ b/src/editor-scroll-view-component.coffee @@ -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