Behaviour SwRS-MDOKFSTUDIO-TABLE-123
Tab and the arrow keys move between table cells
When the writer presses Tab, Shift+Tab or an arrow key at the edge of the text in a cell text box, the extension SHALL move the editor to the next, previous or neighbouring rendered cell with the caret at the end of its text (at the start for the cell to the right and the cell below), and SHALL leave the key to the browser or hand it to block-to-block navigation when no cell can take it.
Step 1 of path 1 in StRS-MDOKFSTUDIO-TABLE-006: from “A cell editor is open” to “The editor is in the neighbouring cell”.
Scenarios 7
The situations the tests check; open one to read it.
nominalTab along a row and across rows
boundaryShift+Tab and held modifiers
| Input | Outcome |
|---|---|
| Shift+Tab in the first cell of the first body row of a two-column table | The editor moves to the second header cell with the caret at the end of its text |
| Shift+Tab in the second header cell | The editor moves to the first header cell |
| Shift+Tab in the first header cell | The editor stays in that cell and the key is prevented |
| Ctrl+Tab in a cell (Tab with Cmd, Ctrl or Alt is not handled by the cell editor) | The editor does not move |
| Shift+Ctrl+Tab in a cell | The editor does not move |
nominalArrowLeft and ArrowRight at the edges of the text
nominalArrowUp and ArrowDown at the first and last line
boundaryKeys that stay native
| Input | Outcome |
|---|---|
| Caret in the middle of the text, ArrowRight | The key stays native and the caret moves within the text |
| Cell text wrapped over several visual lines, caret on the middle line, ArrowUp or ArrowDown | The caret moves between the visual lines; the editor leaves the cell only from the first or the last visual line |
| All of the text selected, or Shift, Alt, Cmd or Ctrl held, caret at an edge, an arrow key | The key is not prevented and the editor stays in its cell |
| IME composition in progress, caret at an edge, an arrow key | The editor stays in its cell |
| Rendered table with a third column in the row below that the Markdown model lacks, editor at the end of the text in the second column, ArrowRight | The key is not prevented and the editor stays in its cell |
| The same table with a matching third cell in the model, ArrowRight | The editor moves to that cell |
| End pressed with Cmd, Ctrl or Alt, or during an IME composition | The cell editor leaves it to the browser |
boundaryNo cell in the arrow direction
The same hand-over to the next block applies with the editor in the last column of the last row when the writer presses ArrowRight at the end of the text, then ArrowDown at the last line.
nominalHome and End in a wide table
Home moves the caret to the start of the text, and Shift extends the selection.