Commit 6d2e1a7e authored by Coung Ngo's avatar Coung Ngo

Fix Issue sticky title URL hash offset

When viewing a linked issue comment, the sticky title covered
part of the comment. This commit fixes this
parent 31157962
......@@ -105,6 +105,7 @@ export const handleLocationHash = () => {
const topPadding = 8;
const diffFileHeader = document.querySelector('.js-file-title');
const versionMenusContainer = document.querySelector('.mr-version-menus-container');
const fixedIssuableTitle = document.querySelector('.issue-sticky-header');
let adjustment = 0;
if (fixedNav) adjustment -= fixedNav.offsetHeight;
......@@ -133,6 +134,10 @@ export const handleLocationHash = () => {
adjustment -= versionMenusContainer.offsetHeight;
}
if (isInIssuePage()) {
adjustment -= fixedIssuableTitle.offsetHeight;
}
if (isInMRPage()) {
adjustment -= topPadding;
}
......
---
title: Fix Issue sticky title URL hash offset
merge_request: 34764
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment