2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

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');
});
},