       attributes: true
       subtree: true
     observer.observe(target, options)
+  componentDidUpdate: ->
+    setTimeout =>
+      @alertWidth = document.getElementById('alert-container').offsetWidth
+    , 350
+    if @needUpdate then @handleAlertChanged()
+    @needUpdate = false
   componentWillUnmount: ->
     window.removeEventListener 'poi.alert', @handleAlert
     window.removeEventListener 'alert.change', @alertWidthChange

  handleAlertChanged: (e) ->
    @setState
      messageWidth: document.getElementById('alert-area').offsetWidth
    if e?.detail?.alertWidth?
      containerWidth = e.detail.alertWidth
    else
      containerWidth = document.getElementById('alert-container').offsetWidth
    contentWidth = document.getElementById('alert-area').offsetWidth
    overflow = containerWidth < contentWidth
    @handleMessageScroll(overflow)

  handleAlert: (e) ->

      else
        @stickyEnd = null
      @message = e.detail.message
      @messageOld = @message
      @messageType = e.detail.type
      @updateAlert()

  componentDidMount: ->
    window.addEventListener 'poi.alert', @handleAlert
    window.addEventListener 'alert.change', @alertWidthChange
    @alertWidth = document.getElementById('alert-container').offsetWidth
    @message = @state.message
    @messageOld = @message
    @needUpdate = false
    observer = new MutationObserver(@handleAlertChanged)
    target = document.getElementById('alert-area')
    options =
