mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: clicking on button label didn't close popup
This commit is contained in:
parent
4634935fe6
commit
d85ac97dc6
1 changed files with 2 additions and 5 deletions
|
@ -11,11 +11,8 @@ export default Ember.Component.extend({
|
||||||
this.sendAction('hide');
|
this.sendAction('hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('html').on(`mouseup.popup-menu-${this.get('elementId')}`, (e) => {
|
$('html').on(`mouseup.popup-menu-${this.get('elementId')}`, () => {
|
||||||
const $target = $(e.target);
|
|
||||||
if ($target.is("button") || this.$().has($target).length === 0) {
|
|
||||||
this.sendAction('hide');
|
this.sendAction('hide');
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue