Commit c18285ce authored by Clement Ho's avatar Clement Ho

Fixed issue where dropdown would not open after clicking on a dropdown item

parent ed4e525a
...@@ -234,8 +234,7 @@ require('./window')(function(w){ ...@@ -234,8 +234,7 @@ require('./window')(function(w){
var self = this; var self = this;
this.windowClickedWrapper = function(e){ this.windowClickedWrapper = function(e){
var thisTag = e.target; var thisTag = e.target;
if(thisTag.tagName === 'LI' || thisTag.tagName === 'A' if(thisTag.tagName !== 'UL'){
|| thisTag.tagName === 'BUTTON'){
// climb up the tree to find the UL // climb up the tree to find the UL
thisTag = utils.closest(thisTag, 'UL'); thisTag = utils.closest(thisTag, 'UL');
} }
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
%button.clear-search.hidden{ type: 'button' } %button.clear-search.hidden{ type: 'button' }
= icon('times') = icon('times')
#js-dropdown-hint.dropdown-menu.hint-dropdown #js-dropdown-hint.dropdown-menu.hint-dropdown
%ul %ul{ 'data-dropdown' => true }
%li.filter-dropdown-item{ 'data-value': '' } %li.filter-dropdown-item{ 'data-value': '' }
%button.btn.btn-link %button.btn.btn-link
= icon('search') = icon('search')
%span %span
Keep typing and press Enter Keep typing and press Enter
%ul.filter-dropdown{ 'data-dynamic' => true } %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
%li.filter-dropdown-item %li.filter-dropdown-item
%button.btn.btn-link %button.btn.btn-link
%i.fa{ 'class': '{{icon}}'} %i.fa{ 'class': '{{icon}}'}
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
{{hint}} {{hint}}
%span.js-filter-tag.dropdown-light-content %span.js-filter-tag.dropdown-light-content
{{tag}} {{tag}}
#js-dropdown-author.dropdown-menu{ 'data-dropdown' => true } #js-dropdown-author.dropdown-menu
%ul.filter-dropdown{ 'data-dynamic' => true } %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
%li.filter-dropdown-item %li.filter-dropdown-item
%button.btn.btn-link.dropdown-user %button.btn.btn-link.dropdown-user
%img.avatar.avatar-inline{ 'data-src': '{{avatar_url}}', width: '30' } %img.avatar.avatar-inline{ 'data-src': '{{avatar_url}}', width: '30' }
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
{{name}} {{name}}
%span.dropdown-light-content %span.dropdown-light-content
@{{username}} @{{username}}
#js-dropdown-assignee.dropdown-menu{ 'data-dropdown' => true } #js-dropdown-assignee.dropdown-menu
%ul %ul{ 'data-dropdown' => true }
%li.filter-dropdown-item{ 'data-value': 'none' } %li.filter-dropdown-item{ 'data-value': 'none' }
%button.btn.btn-link %button.btn.btn-link
No assignee No assignee
%li.divider %li.divider
%ul.filter-dropdown{ 'data-dynamic' => true } %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
%li.filter-dropdown-item %li.filter-dropdown-item
%button.btn.btn-link.dropdown-user %button.btn.btn-link.dropdown-user
%img.avatar.avatar-inline{ 'data-src': '{{avatar_url}}', width: '30' } %img.avatar.avatar-inline{ 'data-src': '{{avatar_url}}', width: '30' }
...@@ -57,22 +57,22 @@ ...@@ -57,22 +57,22 @@
%span.dropdown-light-content %span.dropdown-light-content
@{{username}} @{{username}}
#js-dropdown-milestone.dropdown-menu{ 'data-dropdown' => true } #js-dropdown-milestone.dropdown-menu{ 'data-dropdown' => true }
%ul %ul{ 'data-dropdown' => true }
%li.filter-dropdown-item{ 'data-value': 'none' } %li.filter-dropdown-item{ 'data-value': 'none' }
%button.btn.btn-link %button.btn.btn-link
No milestone No milestone
%li.divider %li.divider
%ul.filter-dropdown{ 'data-dynamic' => true } %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
%li.filter-dropdown-item %li.filter-dropdown-item
%button.btn.btn-link %button.btn.btn-link
{{title}} {{title}}
#js-dropdown-label.dropdown-menu{ 'data-dropdown' => true } #js-dropdown-label.dropdown-menu{ 'data-dropdown' => true }
%ul %ul{ 'data-dropdown' => true }
%li.filter-dropdown-item{ 'data-value': 'none' } %li.filter-dropdown-item{ 'data-value': 'none' }
%button.btn.btn-link %button.btn.btn-link
No label No label
%li.divider %li.divider
%ul.filter-dropdown{ 'data-dynamic' => true } %ul.filter-dropdown{ 'data-dynamic' => true, 'data-dropdown' => true }
%li.filter-dropdown-item %li.filter-dropdown-item
%button.btn.btn-link %button.btn.btn-link
%span.dropdown-label-box{ 'style': 'background: {{color}}'} %span.dropdown-label-box{ 'style': 'background: {{color}}'}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment