Revisit resize and scroll logic once more

Wait a little longer on initial scroll down. Previous timeout sometimes
triggered before all text is finished rendering.

Remove redundant resize calls.
pull/749/head
lilia 10 years ago
parent 7231bcd5ce
commit 07e44ccf21

@ -45,7 +45,7 @@
setTimeout(function() {
this.view.resize();
this.view.scrollToBottom();
}.bind(this), 0);
}.bind(this), 10);
},
events: {

@ -28,12 +28,10 @@ var Whisper = Whisper || {};
},
scrollToBottom: function() {
// TODO: Avoid scrolling if user has manually scrolled up?
this.resize();
this.$el.scrollTop(this.el.scrollHeight);
},
addAll: function() {
Whisper.ListView.prototype.addAll.apply(this, arguments); // super()
this.resize();
this.scrollToBottom();
}
});

Loading…
Cancel
Save