Skip to content

Commit bbfc21e

Browse files
authored
Fix "The sidebar of the repository file list does not have a fixed height #34298" (#34321)
There is a known issue where scrolling to the bottom of the page is affected by unknown elements in the footer area: https://github.com/go-gitea/gitea/blob/24145f811069295b9727f25469f1dd3a7c2c5dd7/templates/base/footer.tmpl#L11-L18 ![after](https://github.com/user-attachments/assets/4cdbce32-d22e-4907-a78b-c8e301017fac)
1 parent 020e774 commit bbfc21e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

templates/repo/view.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{{template "repo/code/recently_pushed_new_branches" .}}
1818

1919
<div class="repo-view-container">
20-
<div class="repo-view-file-tree-container not-mobile {{if not .UserSettingCodeViewShowFileTree}}tw-hidden{{end}}" {{if .IsSigned}}data-user-is-signed-in{{end}}>
20+
<div class="tw-flex tw-flex-col repo-view-file-tree-container not-mobile {{if not .UserSettingCodeViewShowFileTree}}tw-hidden{{end}}" {{if .IsSigned}}data-user-is-signed-in{{end}}>
2121
{{template "repo/view_file_tree" .}}
2222
</div>
2323
<div class="repo-view-content">

web_src/css/repo/home.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
flex: 0 0 15%;
5959
min-width: 0;
6060
max-height: 100vh;
61+
position: sticky;
62+
top: 0;
63+
bottom: 0;
64+
height: 100%;
65+
overflow-y: hidden;
6166
}
6267

6368
.repo-view-content {

0 commit comments

Comments
 (0)