Over scroll of bottom sticky headers should be fixed, and expansion of hidden stuck headers should now work

This commit is contained in:
wmwragg 2016-08-28 19:14:54 +01:00
parent 93fff53e29
commit f2e8607433
4 changed files with 16 additions and 6 deletions

View file

@ -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;

View file

@ -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;
}

View file

@ -49,7 +49,6 @@ limitations under the License.
flex: 1 1 0;
overflow-y: auto;
z-index: 3;
}
.mx_LeftPanel.collapsed .mx_BottomLeftMenu {

View file

@ -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;
}