Commit d4c8e847 authored by Eric Eastwood's avatar Eric Eastwood

Fix "N changed files" link toggler jumping to top

Thanks for the spot @DouweM
https://gitlab.slack.com/archives/C0GQHHPGW/p1490132124022958

See previous MR
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9943

See subsequent MR
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9918

Togglers to check:

 - "Create a Mattermost team for this group" Checkbox,
   http://localhost:3000/groups/new (enable `mattermost` in
`config/gitlab.yml`)
 - "Repo by Url" button, http://localhost:3000/projects/new
 - In MR widget "Modify commit message",
   http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/9
 - Discussion "Toggle discussion",
   http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/3
 - "Showing **1 changed file** with 4 additions and 7 deletions" ,
   http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/3/diffs
 - Commit description toggle "...",
   http://localhost:3000/gitlab-org/gitlab-ce/commits/master
parent 45a2f900
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
$('body').on('click', '.js-toggle-button', function(e) { $('body').on('click', '.js-toggle-button', function(e) {
toggleContainer($(this).closest('.js-toggle-container')); toggleContainer($(this).closest('.js-toggle-container'));
const targetTag = e.target.tagName.toLowerCase(); const targetTag = e.currentTarget.tagName.toLowerCase();
if (targetTag === 'a' || targetTag === 'button') { if (targetTag === 'a' || targetTag === 'button') {
e.preventDefault(); e.preventDefault();
} }
......
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