Skip to content

Bug: Ctrl+A fails to select all cells in table with merged cells when table is the only editor content #8074

@HeuPoH

Description

@HeuPoH

When cells are merged in a table, pressing Ctrl+A does not select all cells within the table. Instead, only a subset of cells are selected, breaking the expected selection behavior for table content.

Lexical version: 0.39.0

Steps To Reproduce

  1. Insert a table into the editor.
  2. Remove all other nodes from the editor, leaving only the table.
  3. Merge two cells in the last column.
  4. Place the cursor inside any cell of the table.
  5. Press Ctrl+A.

Link to code example:
https://playground.lexical.dev
Video:
https://github.com/user-attachments/assets/1b57c791-df24-4244-ad27-c75c576cdc59

The current behavior

Ctrl+A fails to select all cells when the table contains merged cells and is the only element in the editor.

The expected behavior

Ctrl+A should select all cells within the table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions