Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't hydrate when there are html comments #3290

Closed
1 task done
ghost opened this issue Oct 24, 2021 · 1 comment · Fixed by #3327
Closed
1 task done

Doesn't hydrate when there are html comments #3290

ghost opened this issue Oct 24, 2021 · 1 comment · Fixed by #3327
Labels
after X has fix known issue The issue is known and may be left as-is.

Comments

@ghost
Copy link

ghost commented Oct 24, 2021

  • Check if updating to the latest Preact version resolves the issue

Describe the bug
If hydrating markup that contains html comments, a confused re-render happens. It should probably skip comment nodes, or ideally treat them as first class citizens.

To Reproduce

Render component to a string, add some html comments, try to hydrate.

Steps to reproduce the behavior:

  1. Render a component to string.
  2. Add some html comments.
  3. Try to hydrate.

Expected behavior
Should hydrate component but it gets confused and causes duplicate nodes.

@developit
Copy link
Member

This is fixed on restructure and will be in Preact 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
after X has fix known issue The issue is known and may be left as-is.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant