mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 16:34:58 +02:00
fix: use correct segment selector for TOC sidebar positioning
This commit is contained in:
1 file changed
+1
-1
@@ -61,7 +61,7 @@ async function renderRawFileToContainer(container: HTMLElement, rawFileLink: str
|
|||||||
|
|
||||||
function updateSidebarPosition(elFileView: HTMLElement, sidebar: HTMLElement): void {
|
function updateSidebarPosition(elFileView: HTMLElement, sidebar: HTMLElement): void {
|
||||||
const fileHeader = elFileView.querySelector('.file-header');
|
const fileHeader = elFileView.querySelector('.file-header');
|
||||||
const segment = elFileView.querySelector('.ui.segment');
|
const segment = elFileView.querySelector('.ui.bottom.segment');
|
||||||
if (!fileHeader || !segment) return;
|
if (!fileHeader || !segment) return;
|
||||||
|
|
||||||
const headerRect = fileHeader.getBoundingClientRect();
|
const headerRect = fileHeader.getBoundingClientRect();
|
||||||
|
|||||||
Reference in new issue
Block a user