0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed member product modal not closing

no refs

- Added missing close handling for member product modal
This commit is contained in:
Rishabh 2021-06-18 16:28:53 +05:30
parent bc25dbdefa
commit 176ed4a260

View file

@ -60,6 +60,12 @@ export default class ModalMemberProduct extends ModalComponent {
return this.addProduct.perform();
}
@action
close(event) {
event?.preventDefault?.();
this.closeModal();
}
@task({drop: true})
*addProduct() {
let url = this.ghostPaths.url.api(`members/${this.member.get('id')}`);
@ -93,6 +99,10 @@ export default class ModalMemberProduct extends ModalComponent {
actions = {
confirm() {
this.confirmAction(...arguments);
},
// needed because ModalBase uses .send() for keyboard events
closeModal() {
this.close();
}
}
}