clear min-height on ScrollPanel::componentDidUpdate to catch all cases
This commit is contained in:
parent
a6914274b0
commit
3d393b654b
2 changed files with 8 additions and 5 deletions
|
@ -642,14 +642,13 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
updateTimelineMinHeight: function() {
|
updateTimelineMinHeight: function() {
|
||||||
const scrollPanel = this.refs.scrollPanel;
|
const scrollPanel = this.refs.scrollPanel;
|
||||||
const whoIsTyping = this.refs.whoIsTyping;
|
|
||||||
const isTypingVisible = whoIsTyping && whoIsTyping.isVisible();
|
|
||||||
|
|
||||||
if (scrollPanel) {
|
if (scrollPanel) {
|
||||||
if (isTypingVisible) {
|
const isAtBottom = scrollPanel.isAtBottom();
|
||||||
|
const whoIsTyping = this.refs.whoIsTyping;
|
||||||
|
const isTypingVisible = whoIsTyping && whoIsTyping.isVisible();
|
||||||
|
if (isAtBottom && isTypingVisible) {
|
||||||
scrollPanel.blockShrinking();
|
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 will also re-check the fill state, in case the paginate was inadequate
|
||||||
this.checkScroll();
|
this.checkScroll();
|
||||||
|
|
||||||
|
if (!this.isAtBottom()) {
|
||||||
|
this.clearBlockShrinking();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
|
|
Loading…
Reference in a new issue