FIX: clicking on button label didn't close popup

This commit is contained in:
Gerhard Schlager 2017-11-02 17:11:25 +01:00
parent 4634935fe6
commit d85ac97dc6

View File

@ -11,11 +11,8 @@ export default Ember.Component.extend({
this.sendAction('hide');
});
$('html').on(`mouseup.popup-menu-${this.get('elementId')}`, (e) => {
const $target = $(e.target);
if ($target.is("button") || this.$().has($target).length === 0) {
this.sendAction('hide');
}
$('html').on(`mouseup.popup-menu-${this.get('elementId')}`, () => {
this.sendAction('hide');
});
},