Skip to content

Missing tbody in HTML thows a hydration missmatch error.  #54943

Closed

Description

@JeanMeche

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

When a template has a table without a tbody node, browsers adds them dynamincally.

This throws a hydration missmatch error.

The workaround is obvious : adding the tbody after the table node.

  • Should we produce a template warning here ?
  • There are probably other cases where browsers dynamically change the dom when loading the HTML. Should have a more global approach on this.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/fork/github/JeanMeche/ssr-hydration-demo/tree/tbody?template=node

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

v17.

Anything else?

No response

Activity

  1. added this to the needsTriage milestone on Mar 19, 2024
  2. alxhub commented on Mar 19, 2024

    @alxhub
    Member

    We should likely special-case these things in the hydration code path.

  3. JeanMeche commented on Jun 11, 2024

    @JeanMeche
    MemberAuthor

    Dupe of #56392

  4. angular-automatic-lock-bot commented on Jul 12, 2024

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo