diff --git a/src/resizer/room.js b/src/resizer/room.js index 94c8a11484..51bd0d82d8 100644 --- a/src/resizer/room.js +++ b/src/resizer/room.js @@ -65,8 +65,9 @@ class RoomDistributor { _contentSize(item) { const scrollItem = item.domNode.querySelector(".mx_RoomSubList_scroll"); - const headerHeight = item.size() - scrollItem.offsetHeight; - return headerHeight + scrollItem.scrollHeight + 4; + const header = item.domNode.querySelector(".mx_RoomSubList_labelContainer"); + const headerHeight = item.sizer.getItemSize(header); + return headerHeight + scrollItem.scrollHeight; } resize(size) {