clear min-height on ScrollPanel::componentDidUpdate to catch all cases

This commit is contained in:
Bruno Windels 2019-02-04 18:27:22 +00:00
parent a6914274b0
commit 3d393b654b
2 changed files with 8 additions and 5 deletions

View file

@ -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();
}
}
},