You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
set min-height of messagelist to current height when showing typing bar
this ensures the timeline never shrinks, and avoids jumpiness when typing bar disappears again.
This commit is contained in:
@@ -631,9 +631,11 @@ module.exports = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
_scrollDownIfAtBottom: function() {
|
||||
_onTypingVisible: function() {
|
||||
const scrollPanel = this.refs.scrollPanel;
|
||||
if (scrollPanel) {
|
||||
if (scrollPanel && scrollPanel.getScrollState().stuckAtBottom) {
|
||||
scrollPanel.blockShrinking();
|
||||
// scroll down if at bottom
|
||||
scrollPanel.checkScroll();
|
||||
}
|
||||
},
|
||||
@@ -666,7 +668,7 @@ module.exports = React.createClass({
|
||||
|
||||
let whoIsTyping;
|
||||
if (this.props.room) {
|
||||
whoIsTyping = (<WhoIsTypingTile room={this.props.room} onVisible={this._scrollDownIfAtBottom} />);
|
||||
whoIsTyping = (<WhoIsTypingTile room={this.props.room} onVisible={this._onTypingVisible} />);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user