1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

When zoomed in, the sticky headers should correctly position themselves

This commit is contained in:
wmwragg
2016-09-04 08:01:04 +01:00
parent 721baf8d42
commit f9ab2fa957

View File

@@ -324,7 +324,7 @@ module.exports = React.createClass({
var scrollArea = this._getScrollNode(); var scrollArea = this._getScrollNode();
// Use the offset of the top of the scroll area from the window // Use the offset of the top of the scroll area from the window
// as this is used to calculate the CSS fixed top position for the stickies // as this is used to calculate the CSS fixed top position for the stickies
var scrollAreaOffset = scrollArea.getBoundingClientRect().top; var scrollAreaOffset = scrollArea.getBoundingClientRect().top + window.pageYOffset;
// Use the offset of the top of the componet from the window // Use the offset of the top of the componet from the window
// as this is used to calculate the CSS fixed top position for the stickies // as this is used to calculate the CSS fixed top position for the stickies
var scrollAreaHeight = ReactDOM.findDOMNode(this).getBoundingClientRect().height; var scrollAreaHeight = ReactDOM.findDOMNode(this).getBoundingClientRect().height;