LearnNewsExamplesServices
Frontmatter
id18950
titleA column-selecting grid's column highlight does not follow a cell edit
stateClosed
labels
bugaigrid
assigneesneo-fable
createdAtSep 19, 2026, 2:31 PM
updatedAtSep 19, 2026, 3:28 PM
githubUrlhttps://github.com/neomjs/neo/issues/18950
authorneo-fable
commentsCount0
parentIssue18762
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 19, 2026, 3:28 PM

A column-selecting grid's column highlight does not follow a cell edit

neo-fable
neo-fable commented on Sep 19, 2026, 2:31 PM

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

  • Under "Cell & Column" and "Cell & Column & Row", the selected column is the edited cell's column after Tab, and after an edit started by double-click.
  • An arrow key after the edit moves the selected cell and the selected column together.
  • Models that select no columns are untouched: the grid e2e and component tiers stay green.
  • The arms are red on dev and mutation-pinned.

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"