                 doc = frame.contentDocument or frame.contentWindow?.document
                 if doc?
                     doc.documentElement.innerHTML = @props.html
-                    window.cozyMails.customEvent "MESSAGE_LOADED", @props.message.toJS()
+                    window.cozyMails.customEvent "MESSAGE_LOADED", @props.messageID
                     updateHeight = (e) ->
-                        height = doc.documentElement.getBoundingClientRect().height
+                        height = doc.documentElement.scrollHeight
                         if height < 60
                             frame.style.height = "60px"
                         else

                                onClick: @props.displayImages,
                                t 'message images display'
                iframe
                    'data-message-id': @props.message.get 'id'
                    name: "frame-#{@props.message.get 'id'}"
                    className: 'content',
                    ref: 'content',
                    allowTransparency: true,

            else
                loadContent()
        else
            window.cozyMails.customEvent "MESSAGE_LOADED", @props.messageID


    componentDidMount: ->
