Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-06-11 18:51:57 +0300
committerPaul Slaughter <pslaughter@gitlab.com>2019-06-11 22:14:08 +0300
commit3130572f923770cd919e29e3f6e4f6cddd22ee68 (patch)
tree78155436dc5156c8cd916b8411fbea67b4f1451d /app/assets/javascripts/gl_dropdown.js
parentc3e825e01ee868b3cb67cedd9514030fda7081a2 (diff)
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/assets/javascripts/gl_dropdown.js')
-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;
}
}