generated from StabilityNexus/Template-Repo
-
-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Event listeners are attached to various DOM elements (including a document-level keydown listener) but are not properly removed during component teardown.
The destroy() method currently removes DOM elements but does not unregister event listeners. In applications where components are mounted and unmounted frequently (such as SPAs, SSR hydration, or dynamic routing), this can lead to memory leaks and unexpected behavior.
Expected Behavior
All event listeners should be removed during destroy().
Suggested Fix
- Track all registered event listeners centrally
-
Ensure
removeEventListeneris called for:document/windowlisteners- Element-bound listeners
for reference:
#1 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers