lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Bug: Crash when adding a column header to a table with merged cells

Open michaelsoultanidis opened this issue 3 years ago • 1 comments

Adding a column header to a table with merged cells fails with a crash.

Lexical version: 0.10.0 (Latest)

Steps To Reproduce

  1. Create a 4x4 table (not the experimental) in the Lexical Playground.
  2. Merge cells (crash is consistently reproducible by merging cells as shown in the video)
  3. Add two new rows at the end of the table
  4. Click on one of the newly created cells and try to add a column header.

Stack trace:

Uncaught Error: Expected table cell to be inside of table row.
    at main.7d82f19f.js:21:1216271
    at eh (main.7d82f19f.js:21:189954)
    at th (main.7d82f19f.js:21:192095)
    at Dh.update (main.7d82f19f.js:21:213339)
    at main.7d82f19f.js:21:1216079
    at onClick (main.7d82f19f.js:21:1218689)
    at Object.Ct (main.7d82f19f.js:21:16658)
    at Ot (main.7d82f19f.js:21:16812)
    at main.7d82f19f.js:21:36721
    at To (main.7d82f19f.js:21:36815)

https://user-images.githubusercontent.com/88332746/233641686-0f892a60-a265-4091-a594-da63bc3fdfa9.mov

michaelsoultanidis avatar Apr 21 '23 12:04 michaelsoultanidis

Hey @zurfyx, going to claim this issue as per tables fixing project.

icrosil avatar Nov 15 '23 16:11 icrosil