LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtOct 21, 2026, 2:43 PM
updatedAtOct 21, 2026, 3:41 PM
githubUrlhttps://github.com/neomjs/neo/issues/19955
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 21, 2026, 3:41 PM

A focused grid header button scrolls the header away from its body

Closed v13.3.1/archive-v13-3-1-chunk-1 bugaigridaccessibility
neo-opus-ada
neo-opus-ada commented on Oct 21, 2026, 2:43 PM

Context

Outside feedback on the 13.3.0 issues showcase reported that "with a filter visibly set, all values were still shown". The reporter could not reproduce it (defect-note 4aa7bdd6 by @neo-opus-grace, next to #19952–#19954). While reproducing it, I found a recipe that leaves every center header label over the wrong column. Under "Type" a reader sees the Summary text, and under "Area" the Type chips, so a filtered column reads as unfiltered. That makes it a candidate explanation for the report, not one confirmed with the reporter.

The Problem

Reproduced on https://neomjs.com/dist/production/examples/grid/issues/index.html (13.3.0, Chromium, an 800×600 viewport so the center region overflows):

  1. Click into "Search records".
  2. Press Tab until the Area header button has focus, then Tab once more. Focus moves to its menu button ("Filter Area").
  3. The center header row shifts left; the body does not.

Measured: the center .neo-grid-header-toolbar has scrollLeft 289, while .neo-grid-horizontal-scrollbar, which places the body, stays at 0. An automated click that scrolled the Type menu button into view produced the same split (about 140 px). Whether a later body scroll re-aligns them is untested.

The Architectural Reality

  • The horizontal position has one source, the grid's horizontal scrollbar. The main-thread GridHorizontalScrollSync copies the scrollbar's scrollLeft onto the center header toolbar, and ScrollManager#onContainerScroll mirrors it into headerToolbar.scrollLeft for the SortZone's math.
  • Nothing flows the other way. The center header toolbar is an overflow container, so when focus lands on a header element outside the center clip, the browser scrolls that toolbar by itself. The scrollbar and the body stay where they were.
  • Design authority: src/grid/HorizontalScrollbar.mjs (endWidth_) — "Neo.main.addon.GridHorizontalScrollSync copies this element's scrollLeft verbatim onto the center header toolbar — that 1:1 mapping is only exact when scrollport equals the center clip width." A header toolbar that scrolls on its own breaks that 1:1 mapping.
  • src/grid/header/plugin/Menu.mjs calls this.owner.focus() when its menu closes, so a header whose button sits outside the clip may trigger the same native scroll. This is a hypothesis; I haven't tested it.

The Fix

Keep the scrollbar the single source. When the center header toolbar scrolls natively, move the horizontal scrollbar to the same position, so the header and body move together and the focused column comes into view. That is what a keyboard user needs. It belongs in the main-thread GridHorizontalScrollSync, beside the existing copy. Equal values must not echo back.

Acceptance Criteria

  • AC-1: Focusing a header, or its menu button, outside the center clip leaves the header and body aligned: the center header toolbar's scrollLeft equals the horizontal scrollbar's.
  • AC-2: The focused header is visible after the move.
  • AC-3: A browser e2e on the issues showcase at 800×600 is red on base (scrollLeft mismatch after tabbing to the Area menu button) and green at head.

Out of Scope

  • A column's own value menu listing every value of that column. That is by design (the counts follow the other filters), and it is the other reading of the report; it is recorded on the defect-note.
  • #19952, #19953 and #19954.

Related

#19953 · #19952 · #19954 · defect-note 4aa7bdd6

Live latest-open sweep: checked the latest 20 open issues at 2026-10-21T12:42:33Z; no equivalent found (#19952–#19954 cover other symptoms). Exact search GridHorizontalScrollSync: only #17844, unrelated. A2A sweep: the latest 12 messages hold no claim on this symptom. MC sweep: "grid header columns misaligned with body after focus header scrolls horizontal scrollbar out of sync", 5 results: earlier multi-body scroll-sync work; no prior decision about focus-driven header scrolling. Own-assignment sweep: 6 open, none overlapping.

Origin Session ID: 93bb60cd-9a62-43b7-a8e0-25091f9af03f

Retrieval Hint: "grid header toolbar scrolls on focus, header body misaligned, GridHorizontalScrollSync one-way"

tobiu referenced in commit 3387562 - "fix(grid): a header that scrolls itself into view brings its body along (#19955) (#19957) on Oct 21, 2026, 3:41 PM
tobiu closed this issue on Oct 21, 2026, 3:41 PM