summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-05-24 20:51:25 +0000
committerJacob Schatz <jschatz@gitlab.com>2016-05-24 20:51:25 +0000
commitc00ba9a632b894517d9d24d9f263712edba842a1 (patch)
treefd1990255f46ad1216998ce1c026cf75f15677e7 /app/assets
parent28dbf9317b9d58d18c38a529c4a3f001a290663d (diff)
parent72df2da7c2cd004f3c2659249324a4f07f0c71e0 (diff)
downloadgitlab-ce-c00ba9a632b894517d9d24d9f263712edba842a1.tar.gz
Merge branch 'scroll-to-changes-content' into 'master'
Clicking changes tab scrolls the window to show the content When you click on the changes tab in a merge request, it will now scroll the window down to the content. ![scroll](/uploads/c5db23e1c32b1fe62bf4efb815b3f055/scroll.gif) Closes #15133 See merge request !4192
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/merge_request_tabs.js.coffee3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee
index 372732d0aac..49a4727205a 100644
--- a/app/assets/javascripts/merge_request_tabs.js.coffee
+++ b/app/assets/javascripts/merge_request_tabs.js.coffee
@@ -75,6 +75,9 @@ class @MergeRequestTabs
@loadDiff($target.attr('href'))
if bp? and bp.getBreakpointSize() isnt 'lg'
@shrinkView()
+
+ navBarHeight = $('.navbar-gitlab').outerHeight()
+ $.scrollTo(".merge-request-details .merge-request-tabs", offset: -navBarHeight)
else if action == 'builds'
@loadBuilds($target.attr('href'))
@expandView()