                @props.is_prev_sender != next.is_prev_sender or
                @props.is_next_sender != next.is_next_sender or
                @props.editor_name != next.editor_name or
+               @props.saved_mesg != next.saved_mesg or
                @state.edited_message != next_state.edited_message or
                ((not @props.is_prev_sender) and (@props.sender_name != next.sender_name))
 
-    #componentWillUnmount: () ->
-    #    @props.actions.set_editing(@props.message, false)
+    componentDidMount: ->
+        if @refs.editedMessage
+            @setState(edited_message:@props.saved_mesg)
+
+    componentDidUpdate: ->
+        if @refs.editedMessage
+            @props.actions.saved_message(@refs.editedMessage.getValue())
 
     newest_content: ->
         @props.message.get('history').peek()?.get('content') ? ''

            account_name = account.get('first_name') + ' ' + account.get('last_name')
        else
            account_name = "Unknown"

    list_messages: ->
        is_next_message_sender = (index, dates, messages) ->

        is_next_sender : rtypes.bool
        actions        : rtypes.object
        show_heads     : rtypes.bool
        saved_mesg     : rtypes.string
        close_input    : rtypes.func

    getInitialState: ->
        edited_message  : @newest_content()
