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

fix possibly leaking eventlisteners #2253

Conversation

evayde
Copy link
Contributor

@evayde evayde commented Nov 3, 2024

Dialog and Drawer do not clean up the keyboard event listener in disconnectedCallback. This might lead to an issue in SPAs when linking away from within an opened Dialog or Drawer. The issue only exists for Browsers that don't support the CloseWatcher API.

In this case, there's even a function called removeOpenListeners which can be called on disconnectedCallback. This already solves the whole issue.

Copy link

vercel bot commented Nov 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
shoelace ✅ Ready (Inspect) Visit Preview Nov 3, 2024 11:23pm

@evayde evayde force-pushed the fix/drawer-dialog-possible-leaking-eventlisteners branch from ec111ce to 440bd68 Compare November 3, 2024 23:22
@evayde evayde closed this by deleting the head repository Nov 4, 2024
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 this pull request may close these issues.

1 participant