Skip to content

Fixed a bug where server-rendered HTML from sources other than Lustre would virtualise incorrectly.#446

Merged
hayleigh-dot-dev merged 5 commits into
mainfrom
hayleigh/445
Mar 22, 2026
Merged

Fixed a bug where server-rendered HTML from sources other than Lustre would virtualise incorrectly.#446
hayleigh-dot-dev merged 5 commits into
mainfrom
hayleigh/445

Conversation

@hayleigh-dot-dev
Copy link
Copy Markdown
Collaborator

We were making too-strong assumptions about the source of existing HTML when virtualising the DOM. This was problematic when the element being mounted contained multiple children but not fragment comment markers: instead of removing or handling the multiple children, they were ignored and left in the DOM.

This scenario could come up in two ways:

  • The HTML was rendered from a source other than Lustre, such as a server-side templating language .
  • The HTML was server-rendered using an older version of Lustre such as 5.4.0 (which means we accidentally introduced a breaking change, oops!)

To address this we now always virtualise multiple children at the root as a fragment. If the expected fragment comment markers are not present, they are added directly to the DOM before virtualisation to avoid special-casing how fragments are virtualised.

@yoshi-monster
Copy link
Copy Markdown
Contributor

rebased and handled the case we spoke about :)

@hayleigh-dot-dev hayleigh-dot-dev merged commit 915a105 into main Mar 22, 2026
1 check passed
@hayleigh-dot-dev hayleigh-dot-dev deleted the hayleigh/445 branch March 22, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

query selection change in lustre.start from 5.5.0 onward.

2 participants