Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when closing a Modal #759

Open
Gorzas opened this issue May 23, 2019 · 4 comments · May be fixed by #760
Open

TypeError when closing a Modal #759

Gorzas opened this issue May 23, 2019 · 4 comments · May be fixed by #760

Comments

@Gorzas
Copy link
Contributor

Gorzas commented May 23, 2019

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:

  1. Open a md-modal.
  2. Click outside the modal.
  3. 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.

Gorzas added a commit to Neuromobile/ember-cli-materialize that referenced this issue May 23, 2019
@Gorzas Gorzas linked a pull request May 23, 2019 that will close this issue
@vladern
Copy link

vladern commented Jun 24, 2021

@mike-north why not accept PR ?

@jacobq
Copy link
Collaborator

jacobq commented Jun 24, 2021

@mike-north why not accept PR ?

I suspect that he has not had time or interest to continue maintaining this project (I know that that happens to me quite a bit -- it's often more involved than simply accepting a PR: review, CI tweaks, changelog, publishing, ...). There's quite a bit of effort that would be needed to bring this addon up to the latest Ember conventions, etc. There has also been very little visible activity on Materialize (see Dogfalo/materialize#6438 (comment)), which may also be contributing.

@vladern
Copy link

vladern commented Jun 25, 2021

@mike-north why not accept PR ?

I suspect that he has not had time or interest to continue maintaining this project (I know that that happens to me quite a bit -- it's often more involved than simply accepting a PR: review, CI tweaks, changelog, publishing, ...). There's quite a bit of effort that would be needed to bring this addon up to the latest Ember conventions, etc. There has also been very little visible activity on Materialize (see Dogfalo/materialize#6438 (comment)), which may also be contributing.

He had a year to review the PR, so I can assume that this project is abandoned, true ?

@Gorzas
Copy link
Contributor Author

Gorzas commented Jun 25, 2021

@vladern the project needs a lot of work to be maintained. I don't know if the developer is going to take a look to all PRs. The best way to go is to create a fork of the project. I made a lot of improvements (never merged into master) and I have a lot of knowledge of the repo, let me know if you need help with that 😄 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants