You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Always setup stickies, even if we aren't going to use them so that the following map can fire
This commit is contained in:
@@ -333,22 +333,20 @@ module.exports = React.createClass({
|
|||||||
this.scrollAreaSufficient = (120 + (stickies[0].getBoundingClientRect().height * stickies.length)) < scrollAreaHeight;
|
this.scrollAreaSufficient = (120 + (stickies[0].getBoundingClientRect().height * stickies.length)) < scrollAreaHeight;
|
||||||
|
|
||||||
// Initialise the sticky headers
|
// Initialise the sticky headers
|
||||||
if (this.scrollAreaSufficient) {
|
if (typeof stickies === "object" && stickies.length > 0) {
|
||||||
if (typeof stickies === "object" && stickies.length > 0) {
|
// Initialise the sticky headers
|
||||||
// Initialise the sticky headers
|
this.stickyWrappers = Array.prototype.map.call(stickies, function(sticky, i) {
|
||||||
this.stickyWrappers = Array.prototype.map.call(stickies, function(sticky, i) {
|
// Save the positions of all the stickies within scroll area.
|
||||||
// Save the positions of all the stickies within scroll area.
|
// These positions are relative to the LHS Panel top
|
||||||
// These positions are relative to the LHS Panel top
|
sticky.dataset.originalPosition = sticky.offsetTop - scrollArea.offsetTop;
|
||||||
sticky.dataset.originalPosition = sticky.offsetTop - scrollArea.offsetTop;
|
|
||||||
|
|
||||||
// Save and set the sticky heights
|
// Save and set the sticky heights
|
||||||
var originalHeight = sticky.getBoundingClientRect().height;
|
var originalHeight = sticky.getBoundingClientRect().height;
|
||||||
sticky.dataset.originalHeight = originalHeight;
|
sticky.dataset.originalHeight = originalHeight;
|
||||||
sticky.style.height = originalHeight;
|
sticky.style.height = originalHeight;
|
||||||
|
|
||||||
return sticky;
|
return sticky;
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user