diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index fc3b421e89..dd3d92913c 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -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(); } } }, diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index be5f23c420..1df5e876e8 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -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() {