Skip to content

[Blazor] Prevent unwanted DOM merging during enhanced page updates #51707

Description

There might be times when an enhanced page update results in DOM elements getting merged/recycled in an undesirable manner. This is fine in many cases but can sometimes cause strange side effects (e.g., weird CSS animations playing on merged elements).

We should consider introducing a data-key attribute that can be used to manually indicate that a DOM element can only be merged with another element with a matching data-key attribute.

A current workaround is to wrap content in an element with a unique tag name to prevent it from getting merged. This could be an unresolved custom element tag name, e.g., <pricing-grid>.

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

Metadata

Assignees

No one assigned

    Labels

    Pillar: Complete Blazor WebPriority:1Work that is critical for the release, but we could probably ship withoutarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-enhanced-navigation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions