Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2638 from matrix-org/bwindels/typingnotifswhitesp…
Browse files Browse the repository at this point in the history
…acefix2

Fix excessive timeline whitespace
  • Loading branch information
bwindels authored Feb 14, 2019
2 parents 690f3ed + 9e260ad commit abf96fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/structures/ScrollPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ module.exports = React.createClass({
// forget what we wanted, so don't overwrite the saved state unless
// this appears to be a user-initiated scroll.
if (sn.scrollTop != this._lastSetScroll) {
// when scrolling, we don't care about disappearing typing notifs shrinking the timeline
// this might cause the scrollbar to resize in case the max-height was not correct
// but that's better than ending up with a lot of whitespace at the bottom of the timeline.
// we need to above check because when showing the typing notifs, an onScroll event is also triggered
if (!this.isAtBottom()) {
this.clearBlockShrinking();
}

this._saveScrollState();
} else {
debuglog("Ignoring scroll echo");
Expand Down

0 comments on commit abf96fd

Please sign in to comment.