diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 0aee19545c..b07b975b5e 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -1020,7 +1020,14 @@ var TimelinePanel = React.createClass({ var boundingRect = node.getBoundingClientRect(); if ((allowPartial && boundingRect.top < wrapperRect.bottom) || (!allowPartial && boundingRect.bottom < wrapperRect.bottom)) { - return i; + let latestReadEventIndex = i; + // Place the RM at a hidden event below the latest seen event (if exists) + // to prevent RM going up the timeline between clients which do not hide the same events. + for (let j = i; j < this.state.events.length; ++j) { + if (messagePanel._shouldShowEvent(this.state.events[j])) break; + latestReadEventIndex = j; + } + return latestReadEventIndex; } } return null;