Fixes #71 Autoscroll
Conversation view autoscroll triggers on dom change, not storage change, ensuring that we don't scroll before the new element is inserted.
This commit is contained in:
parent
13446e9c17
commit
0956d328da
3 changed files with 9 additions and 7 deletions
|
@ -6,6 +6,12 @@ var Whisper = Whisper || {};
|
|||
Whisper.MessageListView = Whisper.ListView.extend({
|
||||
tagName: 'ul',
|
||||
className: 'discussion',
|
||||
itemView: Whisper.MessageView
|
||||
itemView: Whisper.MessageView,
|
||||
events: {
|
||||
'add': 'scrollToBottom'
|
||||
},
|
||||
scrollToBottom: function() {
|
||||
this.$el.scrollTop(this.el.scrollHeight);
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue