Skip to content

Patch.Append recreate existing DOM nodes? #3945

Closed as duplicate
Closed as duplicate

Description

@ryushinozaki

Hi, thank you so much for creating Dash. I’ve really enjoyed using it, and it has been the foundation for one of my own projects.
While investigating a performance issue in my application, I noticed what seems to be a behavioral change between Dash 4.1.0 and 4.2.0. I may be misunderstanding how Patch.Append is intended to work, so I wanted to ask whether this behavior is expected.

Describe your context
pip list | grep dash
dash 4.3.0

  • OS: macOS Tahoe 26.5.2
  • Browser: Google Chrome 151.0.7922.77 (arm64)
  • Python: 3.12.10

Describe the bug
In my test, a callback returns only a root-level Patch.Append to append one child. The existing child is not returned or replaced.
With Dash 4.1.0, the existing DOM node is preserved.
With Dash 4.2.0, the existing DOM node appears to be disconnected and recreated.
I first noticed this while investigating my own application, and then reproduced the same behavior in a small standalone example.
Dash 4.1.0
{
"same": true,
"beforeConnected": true,
"afterConnected": true,
"childCount": 2
}
Dash 4.2.0
{
"same": false,
"beforeConnected": false,
"afterConnected": true,
"childCount": 2
}

Expected behavior
I expected a tail Patch.Append to preserve the existing child DOM node and only create the newly appended child.
If I’m misunderstanding the intended semantics of Patch.Append, I’d really appreciate any clarification.

Thank you.

Activity

  1. camdecoster commented on Aug 11, 2026

    @camdecoster
    Contributor

    Thanks for the report! This appears to be a duplicate of #3846, so I'm going to close this issue. If you have more comments, please make them there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions