Skip to content

Commit

Permalink
better scrolling in chat rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Feb 8, 2013
1 parent 8f7f0f4 commit 4006ad2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/backbone/views/chatbox.js.coffee
Expand Up @@ -36,6 +36,8 @@ class Kandan.Views.Chatbox extends Backbone.View

activity.save({},{success: (model, response)->
$("#activity-c#{model.cid}").attr("id", "activity-#{model.get('id')}")
$scrollbox = $(event.target).parent().find(".paginated-activities")
$scrollbox.prop("scrollTop", $scrollbox.prop('scrollHeight'))
})

render: ()->
Expand Down

0 comments on commit 4006ad2

Please sign in to comment.