diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index b6dd17e8b6..d322a83225 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -569,11 +569,12 @@ module.exports = React.createClass({ debuglog("unable to save scroll state: found no children in the viewport"); return; } - debuglog("saving anchored scroll state to message", node && node.innerText); + const scrollToken = node.dataset.scrollTokens.split(',')[0]; + debuglog("saving anchored scroll state to message", node && node.innerText, scrollToken); this.scrollState = { stuckAtBottom: false, trackedNode: node, - trackedScrollToken: node.dataset.scrollTokens.split(',')[0], + trackedScrollToken: scrollToken, bottomOffset: this._topFromBottom(node), }; },