-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Describe the bug
When I try to close a modal clicking outside it, the console throws an error and it doesn't calls the action to close in the controller. I think it's a problem with the latest versions of Ember and the compatibility with the library modal-dialog.
This is because this.get('onClose') in model-dialog is a string instead a function.
To Reproduce
Steps to reproduce the behavior:
- Open a
md-modal. - Click outside the modal.
- In the console, you're going to see the following:
TypeError: this.get(...) is not a function.
Expected behavior
It should call the controller action.
Desktop (please complete the following information):
- Browser Chrome 73 and Firefox
- Ember 3.4.4
Additional context
I think that's going to need to remove sendAction in the following lines. Like this:
cancel() {
this.close();
},
actions: {
closeModal() {
this.close();
}
}
Not tested. Could it have some problem with older Ember versions? The change is very little so I'm going to make and discuss about it after being done.