From d77ab891a0b10156399711947bb319ad4ff0b2ed Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 6 Mar 2018 11:25:15 +0000 Subject: [PATCH] Update tooltip position on scroll. --- src/components/views/rooms/RoomTooltip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/views/rooms/RoomTooltip.js b/src/components/views/rooms/RoomTooltip.js index 518ceacc4..a902045f0 100644 --- a/src/components/views/rooms/RoomTooltip.js +++ b/src/components/views/rooms/RoomTooltip.js @@ -39,6 +39,7 @@ module.exports = React.createClass({ this.tooltipContainer = document.createElement("div"); this.tooltipContainer.className = "mx_RoomTileTooltip_wrapper"; document.body.appendChild(this.tooltipContainer); + window.addEventListener('scroll', this._renderTooltip, true); this._renderTooltip(); }, @@ -57,6 +58,7 @@ module.exports = React.createClass({ ReactDOM.unmountComponentAtNode(this.tooltipContainer); document.body.removeChild(this.tooltipContainer); + window.removeEventListener('scroll', this._renderTooltip, true); }, _renderTooltip: function() {