lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Bug: table can't be deleted when it has more than one colspan rows

Open mrdivyansh opened this issue 1 year ago • 1 comments

Lexical version: 0.16.1

Steps To Reproduce

Sample Table

Colspan row 1

Cell a

Cell b

Cell c

Cell d

Colspan row 2

  1. Visit https://playground.lexical.dev/
  2. Copy and paste the above sample table.
  3. Select the table by pressing Cmd+A
  4. Press Backspace to 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).

mrdivyansh avatar Jul 22 '24 04:07 mrdivyansh

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.

elbotho avatar Aug 21 '24 11:08 elbotho

No longer reproducible with recent table refactoring

etrepum avatar Dec 02 '24 05:12 etrepum