     @chat = App.Chat.find(@session.chat_id)
     @name = "#{@chat.displayName()} ##{@session.id}"
 
-    @on 'layout-change', @scrollToBottom
+    @on 'layout-change', @onLayoutChange
 
     @bind('chat_session_typing', (data) =>
       return if data.session_id isnt @session.session_id

      isNew: isNew
      timestamp: Date.now()

    @scrollToBottom()

  showWritingLoader: =>
    if !@isTyping

      return if data.session_id isnt @session.session_id
      @focus()
    )

  onLayoutChange: =>
    @scrollToBottom()

  render: ->
    @html App.view('customer_chat/chat_window')
