Skip to content

Conditional branching within table <td> elements causes DOM structure corruption #1116

@k-wakamatsu-tms

Description

@k-wakamatsu-tms

Astro Info

Astro                    v5.14.1
Vite                     v6.3.6
Node                     v20.19.1
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Conditional branching within table elements causes DOM structure corruption. Visually, the UI elements appearing after

are rendered above the table.

                  <tr>
                    <th>hoge</th>
                    <td>
                      {
                        formData.hoge === 'other' &&
                          formData.hoge_other && (
                            <> ({formData.hoge_other })</>
                          )
                      }
                    </td>
                  </tr>
Image

What's the expected result?

displaying exactly as the DOM structure is written

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-9c13wkr2?file=src%2Fpages%2Findex.astro

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P3: minor bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions