From 321889f95bf849d0efdae88e48b440a7fa69d450 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 17 Jun 2020 20:01:03 -0600 Subject: [PATCH 1/2] Clear `top` when not sticking headers to the top Fixes https://github.com/vector-im/riot-web/issues/14070 --- src/components/structures/LeftPanel2.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/structures/LeftPanel2.tsx b/src/components/structures/LeftPanel2.tsx index ba0ba211b7..242d0b46de 100644 --- a/src/components/structures/LeftPanel2.tsx +++ b/src/components/structures/LeftPanel2.tsx @@ -108,6 +108,7 @@ export default class LeftPanel2 extends React.Component { header.classList.add("mx_RoomSublist2_headerContainer_sticky"); header.classList.add("mx_RoomSublist2_headerContainer_stickyBottom"); header.style.width = `${headerStickyWidth}px`; + header.style.top = "unset"; gotBottom = true; } else if (slRect.top < top) { header.classList.add("mx_RoomSublist2_headerContainer_sticky"); @@ -119,6 +120,7 @@ export default class LeftPanel2 extends React.Component { header.classList.remove("mx_RoomSublist2_headerContainer_stickyTop"); header.classList.remove("mx_RoomSublist2_headerContainer_stickyBottom"); header.style.width = `unset`; + header.style.top = "unset"; } } }; From 8f3a6fc30ecd35abe27cc959a554c3e7aa471918 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 18 Jun 2020 07:48:36 -0600 Subject: [PATCH 2/2] Consistent quotes --- src/components/structures/LeftPanel2.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/LeftPanel2.tsx b/src/components/structures/LeftPanel2.tsx index 242d0b46de..b5da44caef 100644 --- a/src/components/structures/LeftPanel2.tsx +++ b/src/components/structures/LeftPanel2.tsx @@ -108,7 +108,7 @@ export default class LeftPanel2 extends React.Component { header.classList.add("mx_RoomSublist2_headerContainer_sticky"); header.classList.add("mx_RoomSublist2_headerContainer_stickyBottom"); header.style.width = `${headerStickyWidth}px`; - header.style.top = "unset"; + header.style.top = `unset`; gotBottom = true; } else if (slRect.top < top) { header.classList.add("mx_RoomSublist2_headerContainer_sticky"); @@ -120,7 +120,7 @@ export default class LeftPanel2 extends React.Component { header.classList.remove("mx_RoomSublist2_headerContainer_stickyTop"); header.classList.remove("mx_RoomSublist2_headerContainer_stickyBottom"); header.style.width = `unset`; - header.style.top = "unset"; + header.style.top = `unset`; } } };