Phenomenon
When pasting formatted content into a table cell in Chrome, the table structure may break. Cells may be removed, rows may be deleted, or the table may become malformed.
Reproduction example
- Create a table:
<table><tr><td>Cell 1</td><td>Cell 2</td></tr></table> - Paste formatted HTML content into a cell
- Observe table structure
Observed behavior
- Table cells may be removed
- Rows may be deleted
- Table structure becomes malformed
- DOM structure breaks
Expected behavior
- Table structure should be maintained
- Cells should remain intact
- Pasted content should be within cell
- Structure should be preserved
Browser Comparison
- Chrome/Edge: May break structure (this case)
- Firefox: More likely to break structure
- Safari: Most likely to break structure
Notes and possible direction for workarounds
- Intercept paste in table cells
- Strip block-level elements from pasted content
- Preserve table structure
- Validate structure after paste