mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Update tooltip position on scroll.
This commit is contained in:
parent
9fc7435ea2
commit
d77ab891a0
@ -39,6 +39,7 @@ module.exports = React.createClass({
|
|||||||
this.tooltipContainer = document.createElement("div");
|
this.tooltipContainer = document.createElement("div");
|
||||||
this.tooltipContainer.className = "mx_RoomTileTooltip_wrapper";
|
this.tooltipContainer.className = "mx_RoomTileTooltip_wrapper";
|
||||||
document.body.appendChild(this.tooltipContainer);
|
document.body.appendChild(this.tooltipContainer);
|
||||||
|
window.addEventListener('scroll', this._renderTooltip, true);
|
||||||
|
|
||||||
this._renderTooltip();
|
this._renderTooltip();
|
||||||
},
|
},
|
||||||
@ -57,6 +58,7 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
ReactDOM.unmountComponentAtNode(this.tooltipContainer);
|
ReactDOM.unmountComponentAtNode(this.tooltipContainer);
|
||||||
document.body.removeChild(this.tooltipContainer);
|
document.body.removeChild(this.tooltipContainer);
|
||||||
|
window.removeEventListener('scroll', this._renderTooltip, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_renderTooltip: function() {
|
_renderTooltip: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user