From 790e752b7a4f0603406ec80e0324f925dbc559ec Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 14 Feb 2019 16:11:38 +0100 Subject: [PATCH 1/2] clear min-height on scroll --- src/components/structures/ScrollPanel.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index 1df5e876e8..25cccd2dd8 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -211,6 +211,12 @@ 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 + this.clearBlockShrinking(); + this._saveScrollState(); } else { debuglog("Ignoring scroll echo"); From 9e260ad96b170654ddd3cb40a4b289bfa7d2bf67 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 14 Feb 2019 16:19:58 +0100 Subject: [PATCH 2/2] make sure we're at the bottom, although that seems to always be the case in this branch? --- src/components/structures/ScrollPanel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index 25cccd2dd8..a1a7d08e0b 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -215,7 +215,9 @@ module.exports = React.createClass({ // 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 - this.clearBlockShrinking(); + if (!this.isAtBottom()) { + this.clearBlockShrinking(); + } this._saveScrollState(); } else {