Skip to content

🐛 BUG: textarea inside of table cell causes end of table to shift #1077

@kfranqueiro

Description

@kfranqueiro

What version of @astrojs/compiler are you using?

2.12.0

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

Given the following template including a textarea in a table cell, and a paragraph after the table:

<!DOCTYPE html>
<html>
  <body>
  <table>
    <tr>
      <td><textarea name="test"></textarea></td>
    </tr>
  </table>
  <p>Hello!</p>
  </body>
</html>

This results in the p being rendered inside of the table but outside of any tr, which is invalid, and causes browsers to shift it above the table.

<!DOCTYPE html>
<html>

<body>
  <table>
    <tr>
      <td><textarea name="test"></textarea></td>
    </tr>
    <p>Hello!</p>
  </table>
</body>

</html>

This does not happen if the table includes tbody. I haven't found elements other than textarea that cause this.

Link to Minimal Reproducible Example

https://gist.github.com/kfranqueiro/5b6e8699ce9e9b96e5b4e3fa14353e4c

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions