diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-15 12:07:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-15 12:07:19 +0000 |
commit | e6fed37d941271b897d37820fd3b571feab280b0 (patch) | |
tree | c81c9a7d38d6a8b0c1dc5f8ebb784fce68acb288 /app/assets/javascripts/merge_request_tabs.js | |
parent | 45a8c43afe8a17de19a92708b380b29b6ae04ce6 (diff) | |
download | gitlab-ce-e6fed37d941271b897d37820fd3b571feab280b0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/merge_request_tabs.js')
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index eb25879205f..cef224d83e2 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -83,18 +83,6 @@ function scrollToContainer(container) { } } -function computeTopOffset(tabs) { - const navbar = document.querySelector('.navbar-gitlab'); - const peek = document.getElementById('js-peek'); - let stickyTop; - - stickyTop = navbar ? navbar.offsetHeight : 0; - stickyTop = peek ? stickyTop + peek.offsetHeight : stickyTop; - stickyTop = tabs ? stickyTop + tabs.offsetHeight : stickyTop; - - return stickyTop; -} - function mountPipelines() { const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view'); const { mrWidgetData } = gl; @@ -145,11 +133,11 @@ function destroyPipelines(app) { return null; } -function loadDiffs({ url, sticky, tabs }) { +function loadDiffs({ url, tabs }) { return axios.get(url).then(({ data }) => { const $container = $('#diffs'); $container.html(data.html); - initDiffStatsDropdown(sticky); + initDiffStatsDropdown(); localTimeAgo(document.querySelectorAll('#diffs .js-timeago')); syntaxHighlight($('#diffs .js-syntax-highlight')); @@ -537,7 +525,6 @@ export default class MergeRequestTabs { loadDiffs({ url: diffUrl, - sticky: computeTopOffset(this.mergeRequestTabs), tabs: this, }) .then(() => { |