Bug: table can't be deleted when it has more than one colspan rows
Lexical version: 0.16.1
Steps To Reproduce
Sample Table
|
Colspan row 1 |
|||
|
Cell a |
Cell b |
Cell c |
Cell d |
|
Colspan row 2 |
|||
- Visit https://playground.lexical.dev/
- Copy and paste the above sample table.
- Select the table by pressing
Cmd+A - Press
Backspaceto delete the selected table.
The current behavior
Clears the table cells
https://github.com/user-attachments/assets/47a8f27b-ec43-4864-98b1-73af52fae8cd
The expected behavior
Deletes the selected content (the table).
I tried to reproduce this and I think the problem actually occurs if the last row has a merged table cell (no matter how many merged cells there are). Also the selection has to include only the table (usually you have a paragraph before/after). Then I can also reproduce it without copying from your issue.
No longer reproducible with recent table refactoring