summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-06-11 10:51:57 -0500
committerPaul Slaughter <pslaughter@gitlab.com>2019-06-11 14:14:08 -0500
commit3130572f923770cd919e29e3f6e4f6cddd22ee68 (patch)
tree78155436dc5156c8cd916b8411fbea67b4f1451d /app
parentc3e825e01ee868b3cb67cedd9514030fda7081a2 (diff)
downloadgitlab-ce-3130572f923770cd919e29e3f6e4f6cddd22ee68.tar.gz
Fix gl_dropdown scrolling to top on assignee click
**How?** It looks like when assignees are clicked, the child of the `<a>`. We fix our propogation check by looking at `.closest` which traverses through the element itself and parent.
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/gl_dropdown.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js
index 05f34391323..bdb50606a53 100644
--- a/app/assets/javascripts/gl_dropdown.js
+++ b/app/assets/javascripts/gl_dropdown.js
@@ -567,7 +567,7 @@ GitLabDropdown = (function() {
e.stopPropagation();
// This prevents automatic scrolling to the top
- if ($target.is('a')) {
+ if ($target.closest('a').length) {
return false;
}
}