mirror of https://github.com/vector-im/riot-web
Merge pull request #2567 from matrix-org/bwindels/fixjumpdownwhitespace
Fix: 'jump to bottom' creates big amounts of whitespace at the bottompull/21833/head
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…
Reference in New Issue