summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/behaviors
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-03-21 16:57:12 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-03-21 16:57:12 -0500
commitd4c8e84787cb5cff83ba0c54822ba21db97090dc (patch)
treef6df8ed932180a17920d0568a691bc3b85a515e0 /app/assets/javascripts/behaviors
parent45a2f9009bca7a2ba86688f1cf3945dde4381c77 (diff)
downloadgitlab-ce-d4c8e84787cb5cff83ba0c54822ba21db97090dc.tar.gz
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
Diffstat (limited to 'app/assets/javascripts/behaviors')
-rw-r--r--app/assets/javascripts/behaviors/toggler_behavior.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/behaviors/toggler_behavior.js b/app/assets/javascripts/behaviors/toggler_behavior.js
index 92f3bb3ff52..86927314dd4 100644
--- a/app/assets/javascripts/behaviors/toggler_behavior.js
+++ b/app/assets/javascripts/behaviors/toggler_behavior.js
@@ -24,7 +24,7 @@
$('body').on('click', '.js-toggle-button', function(e) {
toggleContainer($(this).closest('.js-toggle-container'));
- const targetTag = e.target.tagName.toLowerCase();
+ const targetTag = e.currentTarget.tagName.toLowerCase();
if (targetTag === 'a' || targetTag === 'button') {
e.preventDefault();
}