     blockClass += " #{bn}--compact" if @mode() == 'new'
 
     div className: blockClass,
-      textarea
+      el TextareaAutosize,
         className: "#{bn}__message"
-        ref: @textareaRef
+        innerRef: @setTextarea
         value: @state.message
         placeholder: osu.trans("comments.placeholder.#{@mode()}")
         onChange: @onChange

#    along with osu!web.  If not, see <http://www.gnu.org/licenses/>.
###

{button, div, span, textarea} = ReactDOMFactories

bn = 'comment-editor'




  componentDidMount: =>
    @textarea.selectionStart = -1
    @textarea.focus() if (@props.focus ? true)


  componentWillUnmount: =>
