diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js
index 5383cf15dc..fc3b421e89 100644
--- a/src/components/structures/MessagePanel.js
+++ b/src/components/structures/MessagePanel.js
@@ -640,6 +640,20 @@ 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) {
+ scrollPanel.blockShrinking();
+ } else {
+ scrollPanel.clearBlockShrinking();
+ }
+ }
+ },
+
onResize: function() {
dis.dispatch({ action: 'timeline_resize' }, true);
},
@@ -668,7 +682,7 @@ module.exports = React.createClass({
let whoIsTyping;
if (this.props.room) {
- whoIsTyping = ();
+ whoIsTyping = ();
}
return (
diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js
index ab10ec4aca..9fe83c2c2d 100644
--- a/src/components/structures/TimelinePanel.js
+++ b/src/components/structures/TimelinePanel.js
@@ -455,7 +455,7 @@ var TimelinePanel = React.createClass({
//
const myUserId = MatrixClientPeg.get().credentials.userId;
const sender = ev.sender ? ev.sender.userId : null;
- var callback = null;
+ var callRMUpdated = false;
if (sender != myUserId && !UserActivity.userCurrentlyActive()) {
updatedState.readMarkerVisible = true;
} else if (lastEv && this.getReadMarkerPosition() === 0) {
@@ -465,11 +465,16 @@ var TimelinePanel = React.createClass({
this._setReadMarker(lastEv.getId(), lastEv.getTs(), true);
updatedState.readMarkerVisible = false;
updatedState.readMarkerEventId = lastEv.getId();
- callback = this.props.onReadMarkerUpdated;
+ callRMUpdated = true;
}
}
- this.setState(updatedState, callback);
+ this.setState(updatedState, () => {
+ this.refs.messagePanel.updateTimelineMinHeight();
+ if (callRMUpdated) {
+ this.props.onReadMarkerUpdated();
+ }
+ });
});
},
diff --git a/src/components/views/rooms/WhoIsTypingTile.js b/src/components/views/rooms/WhoIsTypingTile.js
index 5a2b6afc96..bef8aca0c4 100644
--- a/src/components/views/rooms/WhoIsTypingTile.js
+++ b/src/components/views/rooms/WhoIsTypingTile.js
@@ -77,6 +77,10 @@ module.exports = React.createClass({
Object.values(this.state.delayedStopTypingTimers).forEach((t) => t.abort());
},
+ isVisible: function() {
+ return this.state.usersTyping.length !== 0 || Object.keys(this.state.delayedStopTypingTimers) !== 0;
+ },
+
onRoomTimeline: function(event, room) {
if (room.roomId === this.props.room.roomId) {
const userId = event.getSender();