mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-17 18:32:20 +02:00
Merge pull request #2567 from matrix-org/bwindels/fixjumpdownwhitespace
Fix: 'jump to bottom' creates big amounts of whitespace at the bottom
This commit is contained in:
commit
4dd8febf1d
@ -642,14 +642,13 @@ module.exports = React.createClass({
|
||||
|
||||
updateTimelineMinHeight: function() {
|
||||
const scrollPanel = this.refs.scrollPanel;
|
||||
const whoIsTyping = this.refs.whoIsTyping;
|
||||
const isTypingVisible = whoIsTyping && whoIsTyping.isVisible();
|
||||
|
||||
if (scrollPanel) {
|
||||
if (isTypingVisible) {
|
||||
const isAtBottom = scrollPanel.isAtBottom();
|
||||
const whoIsTyping = this.refs.whoIsTyping;
|
||||
const isTypingVisible = whoIsTyping && whoIsTyping.isVisible();
|
||||
if (isAtBottom && isTypingVisible) {
|
||||
scrollPanel.blockShrinking();
|
||||
} else {
|
||||
scrollPanel.clearBlockShrinking();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -169,6 +169,10 @@ module.exports = React.createClass({
|
||||
//
|
||||
// This will also re-check the fill state, in case the paginate was inadequate
|
||||
this.checkScroll();
|
||||
|
||||
if (!this.isAtBottom()) {
|
||||
this.clearBlockShrinking();
|
||||
}
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user