       @messageOld = @message
       @messageType = e.detail.type
       @updateAlert()
-      @handleThemeChange()
+      @handleStyleChange()
     else if !@dontReserve
       history = @state.history
       history.push <div key={keyCount++} className='alert alert-default alert-history-contents'>{@lastMessage}</div>

    @setState
      showHistory: !@state.showHistory

  handleThemeChange: ->
    setTimeout =>
      try
        alertHeight = $('poi-control').offsetHeight

  componentDidMount: ->
    window.addEventListener 'poi.alert', @handleAlert
    window.addEventListener 'alert.change', @alertWidthChange
    window.addEventListener 'theme.change', @handleStyleChange
    @alertWidth = document.getElementById('alert-container').offsetWidth
    @message = @state.message
    @messageOld = @message
