     #componentDidUpdate: ->
     #    @_initCompose()
 
+    componentWillUnmount: ->
+        if @_saveInterval
+            window.clearInterval @_saveInterval
+        if @state.isDraft and @state.id?
+            if not window.confirm(t 'compose confirm keep draft')
+                MessageActionCreator.delete @state.id, (error) =>
+                    if error?
+                        LayoutActionCreator.alertError "#{t("message action delete ko")} #{error}"
+                    else
+                        LayoutActionCreator.notify t('compose draft deleted')
+
     getInitialState: (forceDefault) ->
 
         # edition of an existing draft

                div className: 'clearfix', null

    _initCompose: ->
        # scroll compose window into view
        @getDOMNode().scrollIntoView()
        if @state.composeInHTML

                if error?
                    LayoutActionCreator.alertError "#{msgKo} :  error"
                else
                    LayoutActionCreator.notify msgOk
                    @setState message

                    if callback?
