Context
Found while driving examples/board/swimlanes for #21357, whose first step says a defect found there becomes an engine ticket linked as a blocker. Measured on dev ccf172411c with that example from ada/21357-board-swimlanes (d185884fd5), headless Chromium at 1440 × 900: with the Design lane's toggle focused, Enter collapses the lane and also opens "Edit card" (Neo.board.CardEditor) for the board's focused card, which takes the focus. Space on the same toggle collapses and expands the lane and keeps the focus.
The Problem
A keyboard user who collapses a lane with Enter gets an editor for a card they did not choose, and loses their place: the next key goes to the editor. Click and Space work, so only Enter is affected.
The Architectural Reality
src/board/SelectionModel.mjs, onKeyDownEnter() (:610), bound on board.keys (:802): unless the target is editable, Enter activates the focused card through board.activateCard(), which opens CardEditor.
- It already returns early when the event path holds a column's collapse button (
neo-board-column-collapse, a <button>, src/board/Column.mjs:530) or a card's menu button (neo-board-card-menu-button, a <button>, src/board/Card.mjs:358), at :619.
- A lane's toggle (
neo-board-lane-collapse, src/board/LaneRow.mjs:188) is a third <button> that list misses. Its native click on Enter collapses the lane, and the board's binding then opens the editor.
- Path nodes carry their tag as
tagName, lower case (src/main/DomEvents.mjs, getTargetData()). Corrected 18 Nov: this line first said tag, read from isEditableTarget(), whose tag === 'input' checks therefore never match a browser path (a defect-note, out of scope here).
- Design authority: the exemption at
onKeyDownEnter():619, "Enter on a column's collapse button or a card's menu button belongs to that button", read from its two class checks. The lane toggle is the same kind of control.
The Fix
In onKeyDownEnter(), replace the two class checks with one rule: when the event path holds a button (node.tagName === 'button'), Enter belongs to that button and the board activates no card. The rule covers the column toggle, the card menu, the lane toggle and any button a later header adds.
Acceptance Criteria
Out of Scope
- The swimlanes example and its e2e (#21357), which checks this in a browser once both land.
- Other keys on the lane toggle: Space already works.
isEditableTarget()'s tag checks (see the corrected line above).
Related
Blocks #21357. Parent #20874; the board family landed with #20875. Owned, not open to contributors: #21357 needs it before the examples read on Fri 20 Nov.
Live latest-open + closed sweep: latest 20 open, plus open and closed search ("board Enter lane collapse card editor"), at 2026-11-18T19:32Z; no equivalent or prior exclusion. Backlog band: 84 open (red); the owning epic is #20874, so this is filed as its leaf.
MC sweep: "Enter on a board lane collapse toggle opens the card editor, keyboard focus jumps to the editor", 5 results, no prior decision found.
Own-assignment sweep: 10 open, none overlapping.
A2A in-flight sweep: the last 20 messages to 19:30Z, no claim on the board's keyboard handling.
Origin Session ID: 26d0379e-899d-47c6-854f-be012fd012d5
Context
Found while driving
examples/board/swimlanesfor #21357, whose first step says a defect found there becomes an engine ticket linked as a blocker. Measured ondevccf172411cwith that example fromada/21357-board-swimlanes(d185884fd5), headless Chromium at 1440 × 900: with the Design lane's toggle focused, Enter collapses the lane and also opens "Edit card" (Neo.board.CardEditor) for the board's focused card, which takes the focus. Space on the same toggle collapses and expands the lane and keeps the focus.The Problem
A keyboard user who collapses a lane with Enter gets an editor for a card they did not choose, and loses their place: the next key goes to the editor. Click and Space work, so only Enter is affected.
The Architectural Reality
src/board/SelectionModel.mjs,onKeyDownEnter()(:610), bound onboard.keys(:802): unless the target is editable, Enter activates the focused card throughboard.activateCard(), which opensCardEditor.neo-board-column-collapse, a<button>,src/board/Column.mjs:530) or a card's menu button (neo-board-card-menu-button, a<button>,src/board/Card.mjs:358), at:619.neo-board-lane-collapse,src/board/LaneRow.mjs:188) is a third<button>that list misses. Its native click on Enter collapses the lane, and the board's binding then opens the editor.tagName, lower case (src/main/DomEvents.mjs,getTargetData()). Corrected 18 Nov: this line first saidtag, read fromisEditableTarget(), whosetag === 'input'checks therefore never match a browser path (a defect-note, out of scope here).onKeyDownEnter():619, "Enter on a column's collapse button or a card's menu button belongs to that button", read from its two class checks. The lane toggle is the same kind of control.The Fix
In
onKeyDownEnter(), replace the two class checks with one rule: when the event path holds a button (node.tagName === 'button'), Enter belongs to that button and the board activates no card. The rule covers the column toggle, the card menu, the lane toggle and any button a later header adds.Acceptance Criteria
test/playwright/unit/board/SelectionModel.spec.mjscovers the three buttons and a card; the lane toggle case is red ondev.Out of Scope
isEditableTarget()'stagchecks (see the corrected line above).Related
Blocks #21357. Parent #20874; the board family landed with #20875. Owned, not open to contributors: #21357 needs it before the examples read on Fri 20 Nov.
Live latest-open + closed sweep: latest 20 open, plus open and closed search ("board Enter lane collapse card editor"), at 2026-11-18T19:32Z; no equivalent or prior exclusion. Backlog band: 84 open (red); the owning epic is #20874, so this is filed as its leaf. MC sweep: "Enter on a board lane collapse toggle opens the card editor, keyboard focus jumps to the editor", 5 results, no prior decision found. Own-assignment sweep: 10 open, none overlapping. A2A in-flight sweep: the last 20 messages to 19:30Z, no claim on the board's keyboard handling.
Origin Session ID: 26d0379e-899d-47c6-854f-be012fd012d5