Skip to content

Conversation

@caio-pizzol
Copy link
Contributor

@caio-pizzol caio-pizzol commented Jan 26, 2026

Fixes two bugs in hitTestTableFragment that caused incorrect cell selection in tables with merged cells (rowspan):

  1. Rowspan X offset: When clicking cells in rows affected by rowspan from above, the X coordinate calculation now accounts for the visual space occupied by the rowspanned cell using ableMeasure.columnWidths.

  2. Grid vs array index: The function now returns the cell array index (colIndex) instead of the grid column index for ProseMirror selection, fixing "Target column not found in row" errors.

image

Fixes two bugs in hitTestTableFragment that caused incorrect cell selection in tables with merged cells (rowspan):

1. Rowspan X offset: When clicking cells in rows affected by rowspan from above, the X coordinate calculation now accounts for the visual space occupied by the rowspanned cell using ableMeasure.columnWidths.

2. Grid vs array index: The function now returns the cell array index (colIndex) instead of the grid column index for ProseMirror selection, fixing "Target column not found in row" errors.
@linear
Copy link

linear bot commented Jan 26, 2026

@caio-pizzol caio-pizzol linked an issue Jan 26, 2026 that may be closed by this pull request
4 tasks
@caio-pizzol caio-pizzol self-assigned this Jan 26, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bd2d0a751

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

merged cell invalid sometimes

2 participants