You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gsx: error when a templ body has more than one top-level element #169
A templ whose body has two top-level elements compiles without complaint, but only the first one is returned from Render. The rest are still generated, so a <modal> placed after the closing tag of the root <div> mounts itself, registers as an overlay and draws on screen, yet it never joins the element tree. Its buttons never receive focus, and Enter, Escape, Tab and clicks all do nothing.
Three guide snippets shipped with exactly this shape (guide 09, fixed in #168, and two places in guide 06) and tui check passed all of them.
The analyzer should report an error when a component body contains more than one top-level Element, ComponentCall, ComponentExpr, ForLoop or IfStmt, anchored at the second one, with a hint to wrap them in a single root element. Top-level LetBinding and GoCode nodes are fine and should not count.
Activity