Skip to content

Append stream behaviour discrepancy #223

@mingan

Description

@mingan

The documented behaviour of an append stream suggests that elements with duplicate IDs are replaced

If the template's first element has an id that is already used by a direct child inside the container targeted by dom_id, it is replaced instead of appended.

where in fact the duplicate elements are removed and the new versions are appended:

https://github.com/hotwired/turbo/blob/bea2f48103ee4578167be2400dcf72451b9c110b/src/core/streams/stream_actions.js#L9-L11

This potentially leads to elements being reordered which is not apparent from the documentation.

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