Context
Leaf of #18762, the column twin of #18941. Measured in real Chromium (Playwright e2e rig, dev@ab2e7cd17c) on examples/grid/cellEditing under its "Cell & Column" and "Cell & Column & Row" models, which no arm has ever switched to. Editing itself works under both (Enter, F2, double-click, Tab, Escape; no page error) — the selection around it does not.
The Problem
Under "Cell & Column" (identical under "Cell & Column & Row", whose row half #18941 repairs):
| Step |
Selected cell |
Selected column |
click firstname of record 1 |
firstname / r1 |
firstname |
| Enter, type, Tab |
randomNumber / r1 (editor there) |
firstname |
| Escape, ArrowRight |
randomDate / r1 |
randomNumber |
| ArrowDown, F2, Enter |
randomDate / r2 |
randomNumber |
double-click firstname of record 2, Enter |
firstname / r2 |
none |
One Tab inside an edit leaves the highlighted column one column behind the selected cell, and it stays there: every later arrow key moves both by one. A double-click edit ends with a selected cell and no selected column.
The Architectural Reality
- A click keeps the two together:
src/selection/grid/CellModel.mjs#onCellClick (:83) calls setSelectedColumns([dataField]) beside the cell toggle.
- The plugin moves the cell alone:
src/grid/plugin/CellEditing.mjs#onTabKey and #onEnterKey call selectionModel.select(view.getLogicalCellId(record, dataField)), the base cell select.
- The drift then persists because
CellModel#onNavKeyColumn (:126) steps the column relatively — BaseModel#stepSelectedColumn(step) starts from the column selected now, not from the selected cell's.
BaseModel#setSelectedColumns(dataFields) is the absolute setter; it returns false and repaints nothing when the selection is unchanged.
The Fix
In CellEditing#startEdit, beside the row rule #18941 adds: a model that selects columns follows the edit by its column — selectionModel.selectsColumns && selectionModel.setSelectedColumns([dataField]). Every start passes there (Enter, F2, double-click, Tab's target), so the column is right for as long as the edit lasts and wherever it ends.
Arms on the public example under both models, red on dev: after Tab the selected column is the editor's; ArrowRight after the edit keeps cell and column together; a double-click edit ended by Enter leaves its column selected.
Stacks on PR #18943 (same block of startEdit).
Acceptance Criteria
Out of Scope
- Making
CellModel#onNavKeyColumn derive the column from the selected cell instead of stepping it. It would self-heal a drift at the next arrow key, but not during the edit that causes it; a separate hardening if wanted.
- The suspended-arrow terminal (@neo-gpt's defect-note of 2026-09-19 12:28Z).
Avoided Traps
- Selecting the column in
onTabKey and onEnterKey beside each cell select: two call sites, and the double-click start would still be missed.
Related
#18762 (epic) · #18941 / PR #18943 (the row twin this stacks on) · D#17832
Live latest-open sweep: checked latest 20 open issues at 2026-09-19T12:31:10Z; no equivalent found.
A2A claim sweep: latest 8 messages (all read-states) at 12:31Z; no overlapping claim.
MC sweep: "column selection stays one column behind the selected cell after Tab in a grid cell edit CellColumnModel stepSelectedColumn", 4 results: the 2026-02 composite-model repairs (row selection lost on horizontal nav) are the same family, fixed in the models then; no decision on the editing plugin's selects.
Own-assignment sweep: 2 open (#15252, #18941); #18941 is the row half and names no column.
Origin Session ID: 2c9503fc-beef-4d80-939b-7d616601cd97
Retrieval Hint: "column highlight one column behind after Tab cell edit setSelectedColumns startEdit"
Context
Leaf of #18762, the column twin of #18941. Measured in real Chromium (Playwright e2e rig, dev@ab2e7cd17c) on
examples/grid/cellEditingunder its "Cell & Column" and "Cell & Column & Row" models, which no arm has ever switched to. Editing itself works under both (Enter, F2, double-click, Tab, Escape; no page error) — the selection around it does not.The Problem
Under "Cell & Column" (identical under "Cell & Column & Row", whose row half #18941 repairs):
firstnameof record 1firstname/ r1firstnamerandomNumber/ r1 (editor there)firstnamerandomDate/ r1randomNumberrandomDate/ r2randomNumberfirstnameof record 2, Enterfirstname/ r2One Tab inside an edit leaves the highlighted column one column behind the selected cell, and it stays there: every later arrow key moves both by one. A double-click edit ends with a selected cell and no selected column.
The Architectural Reality
src/selection/grid/CellModel.mjs#onCellClick(:83) callssetSelectedColumns([dataField])beside the cell toggle.src/grid/plugin/CellEditing.mjs#onTabKeyand#onEnterKeycallselectionModel.select(view.getLogicalCellId(record, dataField)), the base cell select.CellModel#onNavKeyColumn(:126) steps the column relatively —BaseModel#stepSelectedColumn(step)starts from the column selected now, not from the selected cell's.BaseModel#setSelectedColumns(dataFields)is the absolute setter; it returns false and repaints nothing when the selection is unchanged.The Fix
In
CellEditing#startEdit, beside the row rule #18941 adds: a model that selects columns follows the edit by its column —selectionModel.selectsColumns && selectionModel.setSelectedColumns([dataField]). Every start passes there (Enter, F2, double-click, Tab's target), so the column is right for as long as the edit lasts and wherever it ends.Arms on the public example under both models, red on dev: after Tab the selected column is the editor's; ArrowRight after the edit keeps cell and column together; a double-click edit ended by Enter leaves its column selected.
Stacks on PR #18943 (same block of
startEdit).Acceptance Criteria
Out of Scope
CellModel#onNavKeyColumnderive the column from the selected cell instead of stepping it. It would self-heal a drift at the next arrow key, but not during the edit that causes it; a separate hardening if wanted.Avoided Traps
onTabKeyandonEnterKeybeside each cell select: two call sites, and the double-click start would still be missed.Related
#18762 (epic) · #18941 / PR #18943 (the row twin this stacks on) · D#17832
Live latest-open sweep: checked latest 20 open issues at 2026-09-19T12:31:10Z; no equivalent found. A2A claim sweep: latest 8 messages (all read-states) at 12:31Z; no overlapping claim. MC sweep: "column selection stays one column behind the selected cell after Tab in a grid cell edit CellColumnModel stepSelectedColumn", 4 results: the 2026-02 composite-model repairs (row selection lost on horizontal nav) are the same family, fixed in the models then; no decision on the editing plugin's selects. Own-assignment sweep: 2 open (
#15252,#18941);#18941is the row half and names no column.Origin Session ID: 2c9503fc-beef-4d80-939b-7d616601cd97 Retrieval Hint: "column highlight one column behind after Tab cell edit setSelectedColumns startEdit"