Skip to content

Toast DOM nodes are leaked #605

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

Open
Ducklett opened this issue Mar 18, 2025 · 0 comments
Open

Toast DOM nodes are leaked #605

Ducklett opened this issue Mar 18, 2025 · 0 comments

Comments

@Ducklett
Copy link

Steps to reproduce:

  • Go to https://sonner.emilkowal.ski/
  • Open Chrome devtools Performance monitor and Memory tabs
  • Run the garbage collector in the Memory tab and take note of the DOM nodes count in Performance monitor
  • Click the button to create a toast and wait for it to disappear
  • Run the garbage collector again
  • Create a memory snapshot, you'll notice the DOM nodes count has increased and the memory snapshot has a Detached <li tabindex="0" class="" data-sonner-toast="" --
  • Repeat and watch DOM node count increase linearly with each toast() call
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

No branches or pull requests

1 participant