Description
When pressing arrow keys at the edge of the sheet (e.g., LEFT at column 0, UP at row 0), the cell selector wraps around to the opposite end of the sheet. Both Excel and Google Sheets treat boundaries as hard walls — the selection stays put.
Steps to Reproduce
- Open any Univer spreadsheet
- Click on cell A1 (row 0, column 0)
- Press the LEFT arrow key
Expected: Selection stays at A1
Actual: Selection wraps to the last column of the last row
Root Cause
In MoveSelectionCommand, findNextRange() is called with its default isGoBack=true, which activates wrap-around logic at boundaries.
File: packages/sheets-ui/src/commands/commands/set-selection.command.ts (line 124)
Environment
- Univer version: latest dev branch
- Browser: All
- OS: All