Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6777 from robintown/room-list-scroll-jumps
Browse files Browse the repository at this point in the history
Fix room list scroll jumps
  • Loading branch information
turt2live authored Sep 14, 2021
2 parents 34ce618 + 07eafb9 commit 30972c5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions res/css/views/rooms/_RoomSublist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,12 @@ limitations under the License.
}
}

// In the general case, we leave height of headers alone even if sticky, so
// that the sublists below them do not jump. However, that leaves a gap
// when scrolled to the top above the first sublist (whose header can only
// ever stick to top), so we force height to 0 for only that first header.
// See also https://github.com/vector-im/element-web/issues/14429.
&:first-child .mx_RoomSublist_headerContainer {
height: 0;
padding-bottom: 4px;
// In the general case, we reserve space for each sublist header to prevent
// scroll jumps when they become sticky. However, that leaves a gap when
// scrolled to the top above the first sublist (whose header can only ever
// stick to top), so we make sure to exclude the first visible sublist.
&:not(.mx_RoomSublist_hidden) ~ .mx_RoomSublist .mx_RoomSublist_headerContainer {
height: 24px;
}

.mx_RoomSublist_resizeBox {
Expand Down

0 comments on commit 30972c5

Please sign in to comment.