-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
Using modal.dispose() does not clear up the listener on EVENT_KEYDOWN_DISMISS from document
That leads to javascript errors
To Reproduce
Steps to reproduce the behavior:
Follow the instructions in the linked repository
Expected behavior
Using dispose() should clear everything created by the Modal component.
Actual behavior
document is polluted with a listener that cannot fulfill anymore its role
Show your code
Created an application instead of using tailwind-elements playground
Here is the repository: https://github.com/hallelujah/tw-elements-modal-bug
Desktop (please complete the following information):
- OS: Mac OS X Ventura 13.5.2 (22G91)
- Browser Chrome / Safari / Firefox
- Version 117.0.5938.92 / Version 16.6 (18615.3.12.11.2) / Version 16.6 (18615.3.12.11.2)
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Make sure it is indeed an issue/bug report
- If it's a general support question (you just can't figure out how something works), but not an issue with the UI Kit or documentation itself it's better to ask here:
https://github.com/mdbootstrap/Tailwind-Elements/discussions/categories/support-from-community - If it's an idea for a new feature, but you cannot write the code for it yourself, it's better to ask here:
https://github.com/mdbootstrap/Tailwind-Elements/discussions/categories/share-ideas-request-features - If it's general feedback, it's better to post it here:
https://github.com/mdbootstrap/Tailwind-Elements/discussions/categories/kind-words-general-feedback
Metadata
Metadata
Assignees
Labels
Type
Projects
Status