Skip to content

Conversation

@JiuqingSong
Copy link
Collaborator

  1. In table, when press TAB key to move focus to the next cell, if the cell is empty, collapse the selection
  2. In last table cell, when press TAB key, no matter if there is text selected, always create a new table row

Before:
before

After:
after

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves table navigation behavior when using the TAB key to move between cells. It ensures that when navigating to an empty cell, the selection is collapsed to the start of the cell, and when pressing TAB in the last cell, a new row is always created regardless of the current selection state.

  • Removes the collapsed selection check when determining if TAB should trigger table navigation
  • Adds logic to collapse selection when moving to empty table cells

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/roosterjs-content-model-plugins/lib/edit/EditPlugin.ts Removes collapsed selection requirement for table TAB navigation
packages/roosterjs-content-model-core/lib/corePlugin/selection/SelectionPlugin.ts Adds selection collapse logic for empty table cells

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JiuqingSong JiuqingSong merged commit 04fb2b0 into master Oct 2, 2025
7 checks passed
@JiuqingSong JiuqingSong deleted the u/jisong/tableselection branch October 2, 2025 22:53
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.

3 participants