mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
Check if we need to rerender after appending messages to the MessageList
Previously, if the pointer was high on the page such that there was a lot of empty space below and the render window was full (a situation we could get into if we're following new messages arriving), a newly recieved message would not be rendered even though it would have been visible on the screen if we had done a rerender. Adding the _maybe_rerender() call to the end of append() ensures that we don't end up in this situation. (imported from commit 925d3cc62e8221b42f1d5ff1788e99c7d07ccc24)
This commit is contained in:
parent
a57afd9a63
commit
65d2f65bbb
@ -371,6 +371,13 @@ MessageList.prototype = {
|
||||
this._render(slice_to_render, 'bottom');
|
||||
this._render_win_end += slice_to_render.length;
|
||||
}
|
||||
|
||||
// If the pointer is high on the page such that there is a
|
||||
// lot of empty space below and the render window is full, a
|
||||
// newly recieved message should trigger a rerender so that
|
||||
// the new message, which will appear in the viewable area,
|
||||
// is rendered.
|
||||
this._maybe_rerender();
|
||||
},
|
||||
|
||||
prepend: function MessageList_prepend(messages) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user