summaryrefslogtreecommitdiff
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 10:58:01 -0500
commitadfc38db0f2b63696829608cf1195401fa005b37 (patch)
tree5cd61af83f3438868303d1455d2058c36314510b
parentf08abfcc3275c41e3e92e3504188359cc773730c (diff)
downloadgitlab-ce-fe-fix-gl-dropdown-scrolling-to-top.tar.gz
Fix gl_dropdown scrolling to top on assignee clickfe-fix-gl-dropdown-scrolling-to-top
**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.
-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;
}
}