Commit 405fd65a authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '216880-frontend-url-hash-offset' into 'master'

Fix Issue sticky title URL hash offset

See merge request gitlab-org/gitlab!34764
parents 752f62e7 6d2e1a7e
...@@ -105,6 +105,7 @@ export const handleLocationHash = () => { ...@@ -105,6 +105,7 @@ export const handleLocationHash = () => {
const topPadding = 8; const topPadding = 8;
const diffFileHeader = document.querySelector('.js-file-title'); const diffFileHeader = document.querySelector('.js-file-title');
const versionMenusContainer = document.querySelector('.mr-version-menus-container'); const versionMenusContainer = document.querySelector('.mr-version-menus-container');
const fixedIssuableTitle = document.querySelector('.issue-sticky-header');
let adjustment = 0; let adjustment = 0;
if (fixedNav) adjustment -= fixedNav.offsetHeight; if (fixedNav) adjustment -= fixedNav.offsetHeight;
...@@ -133,6 +134,10 @@ export const handleLocationHash = () => { ...@@ -133,6 +134,10 @@ export const handleLocationHash = () => {
adjustment -= versionMenusContainer.offsetHeight; adjustment -= versionMenusContainer.offsetHeight;
} }
if (isInIssuePage()) {
adjustment -= fixedIssuableTitle.offsetHeight;
}
if (isInMRPage()) { if (isInMRPage()) {
adjustment -= topPadding; 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