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.
This commit is contained in:
parent
7231bcd5ce
commit
07e44ccf21
2 changed files with 1 additions and 3 deletions
|
@ -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…
Reference in a new issue