diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2016-12-09 12:11:29 -0600 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-01-09 16:01:10 -0600 |
commit | c18285cec0dadc0af8fa062a10d6cd581efb0b66 (patch) | |
tree | 1fb97a5be28493695dc10c166b064165c1bd2f7a | |
parent | ed4e525a3bd05dfb32aa3c2baa9bf19688319b1a (diff) | |
download | gitlab-ce-c18285cec0dadc0af8fa062a10d6cd581efb0b66.tar.gz |
Fixed issue where dropdown would not open after clicking on a dropdown item
-rw-r--r-- | app/assets/javascripts/droplab/droplab.js | 3 | ||||
-rw-r--r-- | app/views/shared/issuable/_search_bar.html.haml | 22 |
2 files changed, 12 insertions, 13 deletions
diff --git a/app/assets/javascripts/droplab/droplab.js b/app/assets/javascripts/droplab/droplab.js index b17f156acb4..6b326338050 100644 --- a/app/assets/javascripts/droplab/droplab.js +++ b/app/assets/javascripts/droplab/droplab.js @@ -234,8 +234,7 @@ require('./window')(function(w){ var self = this; this.windowClickedWrapper = function(e){ var thisTag = e.target; - if(thisTag.tagName === 'LI' || thisTag.tagName === 'A' - || thisTag.tagName === 'BUTTON'){ + if(thisTag.tagName !== 'UL'){ // climb up the tree to find the UL thisTag = utils.closest(thisTag, 'UL'); } diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index 53983ef8d6d..2d2ecf030a8 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -17,13 +17,13 @@ %button.clear-search.hidden{ type: 'button' } = icon('times') #js-dropdown-hint.dropdown-menu.hint-dropdown - %ul + %ul{ 'data-dropdown' => true } %li.filter-dropdown-item{ 'data-value': '' } %button.btn.btn-link = icon('search') %span Keep typing and press Enter - %ul.filter-dropdown{ 'data-dynamic' => true } + %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true } %li.filter-dropdown-item %button.btn.btn-link %i.fa{ 'class': '{{icon}}'} @@ -31,8 +31,8 @@ {{hint}} %span.js-filter-tag.dropdown-light-content {{tag}} - #js-dropdown-author.dropdown-menu{ 'data-dropdown' => true } - %ul.filter-dropdown{ 'data-dynamic' => true } + #js-dropdown-author.dropdown-menu + %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true } %li.filter-dropdown-item %button.btn.btn-link.dropdown-user %img.avatar.avatar-inline{ 'data-src': '{{avatar_url}}', width: '30' } @@ -41,13 +41,13 @@ {{name}} %span.dropdown-light-content @{{username}} - #js-dropdown-assignee.dropdown-menu{ 'data-dropdown' => true } - %ul + #js-dropdown-assignee.dropdown-menu + %ul{ 'data-dropdown' => true } %li.filter-dropdown-item{ 'data-value': 'none' } %button.btn.btn-link No assignee %li.divider - %ul.filter-dropdown{ 'data-dynamic' => true } + %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true } %li.filter-dropdown-item %button.btn.btn-link.dropdown-user %img.avatar.avatar-inline{ 'data-src': '{{avatar_url}}', width: '30' } @@ -57,22 +57,22 @@ %span.dropdown-light-content @{{username}} #js-dropdown-milestone.dropdown-menu{ 'data-dropdown' => true } - %ul + %ul{ 'data-dropdown' => true } %li.filter-dropdown-item{ 'data-value': 'none' } %button.btn.btn-link No milestone %li.divider - %ul.filter-dropdown{ 'data-dynamic' => true } + %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true } %li.filter-dropdown-item %button.btn.btn-link {{title}} #js-dropdown-label.dropdown-menu{ 'data-dropdown' => true } - %ul + %ul{ 'data-dropdown' => true } %li.filter-dropdown-item{ 'data-value': 'none' } %button.btn.btn-link No label %li.divider - %ul.filter-dropdown{ 'data-dynamic' => true } + %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true } %li.filter-dropdown-item %button.btn.btn-link %span.dropdown-label-box{ 'style': 'background: {{color}}'} |