mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Merge pull request #5895 from matrix-org/gsouquet-fix-sticky-tags
Fix sticky tags header in room list
This commit is contained in:
commit
3d25500f78
@ -41,7 +41,9 @@ limitations under the License.
|
|||||||
// The combined height must be set in the LeftPanel component for sticky headers
|
// The combined height must be set in the LeftPanel component for sticky headers
|
||||||
// to work correctly.
|
// to work correctly.
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
height: 24px;
|
// Allow the container to collapse on itself if its children
|
||||||
|
// are not in the normal document flow
|
||||||
|
max-height: 24px;
|
||||||
color: $roomlist-header-color;
|
color: $roomlist-header-color;
|
||||||
|
|
||||||
.mx_RoomSublist_stickable {
|
.mx_RoomSublist_stickable {
|
||||||
|
@ -154,7 +154,7 @@ export default class LeftPanel extends React.Component<IProps, IState> {
|
|||||||
private doStickyHeaders(list: HTMLDivElement) {
|
private doStickyHeaders(list: HTMLDivElement) {
|
||||||
const topEdge = list.scrollTop;
|
const topEdge = list.scrollTop;
|
||||||
const bottomEdge = list.offsetHeight + list.scrollTop;
|
const bottomEdge = list.offsetHeight + list.scrollTop;
|
||||||
const sublists = list.querySelectorAll<HTMLDivElement>(".mx_RoomSublist");
|
const sublists = list.querySelectorAll<HTMLDivElement>(".mx_RoomSublist:not(.mx_RoomSublist_hidden)");
|
||||||
|
|
||||||
const headerRightMargin = 15; // calculated from margins and widths to align with non-sticky tiles
|
const headerRightMargin = 15; // calculated from margins and widths to align with non-sticky tiles
|
||||||
const headerStickyWidth = list.clientWidth - headerRightMargin;
|
const headerStickyWidth = list.clientWidth - headerRightMargin;
|
||||||
|
Loading…
Reference in New Issue
Block a user