diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-06-11 10:51:57 -0500 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-06-11 14:14:08 -0500 |
commit | 3130572f923770cd919e29e3f6e4f6cddd22ee68 (patch) | |
tree | 78155436dc5156c8cd916b8411fbea67b4f1451d | |
parent | c3e825e01ee868b3cb67cedd9514030fda7081a2 (diff) | |
download | gitlab-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.
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 2 | ||||
-rw-r--r-- | changelogs/unreleased/fe-fix-gl-dropdown-scrolling-to-top.yml | 5 |
2 files changed, 6 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; } } diff --git a/changelogs/unreleased/fe-fix-gl-dropdown-scrolling-to-top.yml b/changelogs/unreleased/fe-fix-gl-dropdown-scrolling-to-top.yml new file mode 100644 index 00000000000..4125b4241e6 --- /dev/null +++ b/changelogs/unreleased/fe-fix-gl-dropdown-scrolling-to-top.yml @@ -0,0 +1,5 @@ +--- +title: Fix scrolling to top on assignee change +merge_request: 29500 +author: +type: fixed |