summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-03-14 11:47:05 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-03-14 11:53:22 -0500
commitf97c1d1001a1c16ab51fb62723f30f6ffa467d4f (patch)
tree3e51a1d4a05180f766f0ab1c5648621a91e35665 /app/assets
parentffcddb295950729dbc4ee7a3c0e32f7dec00da99 (diff)
downloadgitlab-ce-f97c1d1001a1c16ab51fb62723f30f6ffa467d4f.tar.gz
Fix #29414
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/behaviors/toggler_behavior.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/behaviors/toggler_behavior.js b/app/assets/javascripts/behaviors/toggler_behavior.js
index 0726c6c9636..92f3bb3ff52 100644
--- a/app/assets/javascripts/behaviors/toggler_behavior.js
+++ b/app/assets/javascripts/behaviors/toggler_behavior.js
@@ -21,8 +21,13 @@
// %a.js-toggle-button
// %div.js-toggle-content
//
- $('body').on('click', '.js-toggle-button', function() {
+ $('body').on('click', '.js-toggle-button', function(e) {
toggleContainer($(this).closest('.js-toggle-container'));
+
+ const targetTag = e.target.tagName.toLowerCase();
+ if (targetTag === 'a' || targetTag === 'button') {
+ e.preventDefault();
+ }
});
// If we're accessing a permalink, ensure it is not inside a