Skip to content
New issue

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

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

Already on GitHub? # to your account

Destroyed modal still listens on keyup event #88

Closed
luksurious opened this issue Oct 20, 2019 · 1 comment · Fixed by #89
Closed

Destroyed modal still listens on keyup event #88

luksurious opened this issue Oct 20, 2019 · 1 comment · Fixed by #89
Assignees

Comments

@luksurious
Copy link
Contributor

Versions
BulmaJS: 0.10.0
Browser: Any (Chrome/Firefox(
Operating system: Linux/Windows

Describe the bug
When a modal is destroyed the key event listener is not removed. Thus, if a key is typed afterwards on the page a JS error is raised because of the elements in the listener not existing anymore: modal.js:193 Uncaught TypeError: Cannot read property 'classList' of null

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://jsfiddle.net/2wtkp783/
  2. Click on "Open Modal" to make sure a valid modal is created
  3. Close modal
  4. Click on "Destroy Modal"
  5. Type something in the text box below
  6. Observe JS error in browser console

Expected behavior
No error should be raised. The event listener should be removed on destroy.

Screenshots
image

@VizuaaLOG
Copy link
Owner

Reopening and a reminder to port this back to 0.10.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants