Skip to content

Toast DOM nodes are leaked #605

Open
@Ducklett

Description

@Ducklett

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions