Skip to content

Commit d77ab89

Browse files
committed
Update tooltip position on scroll.
1 parent 9fc7435 commit d77ab89

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/components/views/rooms/RoomTooltip.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = React.createClass({
3939
this.tooltipContainer = document.createElement("div");
4040
this.tooltipContainer.className = "mx_RoomTileTooltip_wrapper";
4141
document.body.appendChild(this.tooltipContainer);
42+
window.addEventListener('scroll', this._renderTooltip, true);
4243

4344
this._renderTooltip();
4445
},
@@ -57,6 +58,7 @@ module.exports = React.createClass({
5758

5859
ReactDOM.unmountComponentAtNode(this.tooltipContainer);
5960
document.body.removeChild(this.tooltipContainer);
61+
window.removeEventListener('scroll', this._renderTooltip, true);
6062
},
6163

6264
_renderTooltip: function() {

0 commit comments

Comments
 (0)