     @setState searchOpened: false
 
   _submit: ->
-    return unless @_validComment()
+    return unless @state.validComment
 
     @props.onSubmit? $.trim(@refs.textarea.getText())
     @setState @getInitialState()
     @refs.textarea.updateText ''
 
-  _validComment: ->
-    return false unless @refs
-
-    comment = new Comment content: $.trim(@refs.textarea.getText())
+  _validComment: (text) ->
+    comment = new Comment content: $.trim(text)
     comment.isValid()

  getInitialState: ->
    controlsOpened: false
    searchOpened: false

  _renderTextArea: ->
    ReactTextArea

  _renderSubmitButton: ->
    _button ['button-confirm button-small add-comment-post-button'
      onClick: => @refs.signinPopover.submit(=> @_submit())
      disabled: !@state.validComment
    ],
      Factlink.Global.t.post_comment
      ReactSigninPopover
