Frontmatter
| id | 9015 |
| title | Fix Regression in Cell Selection Model Cycling (Crash in updateRows) |
| state | Closed |
| labels | bugairegression |
| assignees | tobiu |
| createdAt | Feb 6, 2026, 5:52 PM |
| updatedAt | Feb 6, 2026, 5:58 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9015 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 6, 2026, 5:58 PM |
Fix Regression in Cell Selection Model Cycling (Crash in updateRows)
tobiu assigned to @tobiu on Feb 6, 2026, 5:57 PM

tobiu
Feb 6, 2026, 5:58 PM
Input from Gemini 3 Pro:
✦ I have resolved the regression causing the crash during cell cycling and added
aria-selectedsupport for cell models.Fixes Implemented:
Crash Fix in
BaseModel.updateRows:
- The code now safely checks
cellNode?.clsbefore attempting to readincludes.- This prevents the
TypeErrorwhen cycling causes the selection of an unmounted cell (e.g., during a scroll jump).
aria-selectedfor Cells:
- In
BaseModel: Added logic to toggle thearia-selectedattribute on the cell node during granular updates (updateRows), matching the behavior for rows.- In
Row.mjs: UpdatedapplyRendererOutputto strictly checkselectedCells.includes(logicalCellId)and apply both theneo-selectedclass ANDaria-selected=true.- Optimization: In
Row.mjs, combined the selection check to occur aftercellConfigcreation, modifying theclsarray in-place and setting the attribute in one block. This avoids duplicating theincludescheck.The cell selection model should now cycle correctly without errors and properly report accessibility state.
tobiu closed this issue on Feb 6, 2026, 5:58 PM
Cycling through cells (e.g., arrow left on first column to last) causes a crash in
BaseModel.updateRows. The errorTypeError: Cannot read properties of undefined (reading 'cls')occurs becausecellNodecan be undefined if the target cell is not currently rendered (unmounted), but the code attempts to accesscellNode.clsto determinealreadySelectstate before checking ifcellNodeexists.Stack Trace:
BaseModel.mjs:72 Uncaught TypeError: Cannot read properties of undefined (reading 'cls') at BaseModel.mjs:72:54 at Array.forEach (<anonymous>) at CellModel.updateRows (BaseModel.mjs:54:15)Proposed Fix:
cellNode?.clsinBaseModel.mjs.aria-selectedis applied to cells insrc/grid/Row.mjsto ensure unmounted cells get correct attributes when they are eventually rendered.