diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 29d45064..81d851dd 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -115,15 +115,21 @@ var RoomSubList = React.createClass({ }); }, + // The header is collapsable if it is hidden or not stuck // The dataset elements are added in the RoomList _initAndPositionStickyHeaders method - isHeaderStuck: function() { + isCollapsableOnClick: function() { var stuck = this.refs.header.dataset.stuck; - return stuck !== undefined && (stuck === "top" || stuck === "bottom"); + var topBottomSticky = this.refs.header.dataset.topBottomSticky; + if (this.state.hidden || stuck === undefined || stuck === "none") { + return true; + } else { + return false; + } }, onClick: function(ev) { - if (!this.isHeaderStuck()) { - // The header is not stuck, so the click is to be interpreted as collapse and truncation logic + if (this.isCollapsableOnClick()) { + // The header iscCollapsable, so the click is to be interpreted as collapse and truncation logic var isHidden = false; var isTruncatable = this.props.list.length > TRUNCATE_AT; diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomList.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomList.css index a339d80f..06ac885c 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomList.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/RoomList.css @@ -32,3 +32,8 @@ limitations under the License. overflow-x: hidden ! important; overflow-y: scroll ! important; } + +/* Make sure the scrollbar is above the sticky headers from RoomList */ +.mx_RoomList_scrollbar .gm-scrollbar.-vertical { + z-index: 3; +} diff --git a/src/skins/vector/css/vector-web/structures/LeftPanel.css b/src/skins/vector/css/vector-web/structures/LeftPanel.css index 8d8e2093..47f28671 100644 --- a/src/skins/vector/css/vector-web/structures/LeftPanel.css +++ b/src/skins/vector/css/vector-web/structures/LeftPanel.css @@ -49,7 +49,6 @@ limitations under the License. flex: 1 1 0; overflow-y: auto; - z-index: 3; } .mx_LeftPanel.collapsed .mx_BottomLeftMenu { diff --git a/src/skins/vector/css/vector-web/structures/RoomSubList.css b/src/skins/vector/css/vector-web/structures/RoomSubList.css index 3bc468fe..2c1c49a3 100644 --- a/src/skins/vector/css/vector-web/structures/RoomSubList.css +++ b/src/skins/vector/css/vector-web/structures/RoomSubList.css @@ -21,7 +21,7 @@ limitations under the License. } .mx_RoomSubList_labelContainer { - height: 29px; + height: 31px; /* mx_RoomSubList_label height including border */ width: 235px; /* LHS Panel width */ position: relative; }