room sublist seems to get rendered w/o _scroll element
when loading the page from a community url
This commit is contained in:
parent
ab728ead72
commit
75925f6192
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ class RoomSizer extends Sizer {
|
||||||
class RoomDistributor extends FixedDistributor {
|
class RoomDistributor extends FixedDistributor {
|
||||||
resize(itemSize) {
|
resize(itemSize) {
|
||||||
const scrollItem = this.item.querySelector(".mx_RoomSubList_scroll");
|
const scrollItem = this.item.querySelector(".mx_RoomSubList_scroll");
|
||||||
|
if (!scrollItem) {
|
||||||
|
return; //FIXME: happens when starting the page on a community url, taking the safe way out for now
|
||||||
|
}
|
||||||
const fixedHeight = this.item.offsetHeight - scrollItem.offsetHeight;
|
const fixedHeight = this.item.offsetHeight - scrollItem.offsetHeight;
|
||||||
if (itemSize > (fixedHeight + scrollItem.scrollHeight)) {
|
if (itemSize > (fixedHeight + scrollItem.scrollHeight)) {
|
||||||
super.resize("resized-all");
|
super.resize("resized-all");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue