diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-03-09 18:51:52 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-03-09 18:53:09 +0000 |
commit | a7a1a60421f49c1459d46a4092008af12127994c (patch) | |
tree | 296b71d124cc395d24ed7135d7c3237e243ccf2f /app/assets/javascripts/mini_pipeline_graph_dropdown.js | |
parent | 12a0d5a2bca66dc332f160f09a993fef42d356d5 (diff) | |
download | gitlab-ce-a7a1a60421f49c1459d46a4092008af12127994c.tar.gz |
Target all build links inside a dropdown. Use jQuery to handle event delegation.
Diffstat (limited to 'app/assets/javascripts/mini_pipeline_graph_dropdown.js')
-rw-r--r-- | app/assets/javascripts/mini_pipeline_graph_dropdown.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/mini_pipeline_graph_dropdown.js b/app/assets/javascripts/mini_pipeline_graph_dropdown.js index 3029ec17a37..9c58c465001 100644 --- a/app/assets/javascripts/mini_pipeline_graph_dropdown.js +++ b/app/assets/javascripts/mini_pipeline_graph_dropdown.js @@ -40,9 +40,13 @@ export default class MiniPipelineGraph { * target the click event of this component. */ stopDropdownClickPropagation() { - document.querySelector(`${this.container} .js-builds-dropdown-list a.mini-pipeline-graph-dropdown-item`).addEventListener('click', (e) => { - e.stopPropagation(); - }); + $(document).on( + 'click', + `${this.container} .js-builds-dropdown-list a.mini-pipeline-graph-dropdown-item`, + (e) => { + e.stopPropagation(); + }, + ); } /** |