 
 
 
-  messageEditor: ->
+  messageEditor: =>
     return if !@props.canBeEdited
 
     div className: "#{bn}__message-container #{'hidden' if !@state.editing}",

      .value()


  messageInput: (e) ->
    @setState message: e.target.value


  submitIfEnter: (e) ->
    return if e.keyCode != 13

    e.preventDefault()
    @throttledUpdatePost()


  updatePost: ->
    return if @state.message == @props.post.message

    LoadingOverlay.show()

    .always LoadingOverlay.hide


  editStart: =>
    @setState editing: true, =>
      @refs.textarea.focus()


  editEnd: =>
    @setState editing: false


  messageViewer: =>
    [controller, key, deleteModel] =
      if @props.type == 'reply'
        ['beatmap-discussion-posts', 'beatmap_discussion_post', @props.post]
