diff --git a/src/editor-scroll-view-component.coffee b/src/editor-scroll-view-component.coffee index ba2a50755..c4db12bb2 100644 --- a/src/editor-scroll-view-component.coffee +++ b/src/editor-scroll-view-component.coffee @@ -182,15 +182,17 @@ EditorScrollViewComponent = React.createClass measureHeightAndWidth: -> return unless @isMounted() - {editor} = @props node = @getDOMNode() computedStyle = getComputedStyle(node) + {editor} = @props unless computedStyle.height is '0px' - editor.setHeight(node.clientHeight) + clientHeight = node.clientHeight + editor.setHeight(clientHeight) if clientHeight > 0 unless computedStyle.width is '0px' - editor.setWidth(node.clientWidth) + clientWidth = node.clientWidth + editor.setWidth(clientWidth) if clientHeight > 0 focus: -> @refs.input.focus()