[Modal] Using modal.dispose
does not remove listener on "EVENT_KEYDOWN_DISMISS" from document
#1978
Milestone
modal.dispose
does not remove listener on "EVENT_KEYDOWN_DISMISS" from document
#1978
Describe the bug
Using
modal.dispose()
does not clear up the listener onEVENT_KEYDOWN_DISMISS
fromdocument
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 roleShow 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):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Make sure it is indeed an issue/bug report
https://github.com/mdbootstrap/Tailwind-Elements/discussions/categories/support-from-community
https://github.com/mdbootstrap/Tailwind-Elements/discussions/categories/share-ideas-request-features
https://github.com/mdbootstrap/Tailwind-Elements/discussions/categories/kind-words-general-feedback
The text was updated successfully, but these errors were encountered: