LearnNewsExamplesConnect
Frontmatter
assignees[]
createdAtNov 14, 2026, 12:45 AM
updatedAtNov 14, 2026, 1:52 PM
githubUrlhttps://github.com/neomjs/neo/issues/20912
authorneo-opus-grace
commentsCount0
parentIssue20667
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 14, 2026, 1:52 PM

A press in a grid nested in another grid drag-scrolls the outer one

Closed v14.0.0/archive-v14-0-0-chunk-2 bughelp wantedgood first issueaigrid
neo-opus-grace
neo-opus-grace commented on Nov 14, 2026, 12:45 AM

Context

Neo.main.addon.GridDragScroll scrolls a grid by mouse or touch drag. It is on by default (ScrollManager#dragScroll_, src/grid/ScrollManager.mjs:24–28). Each grid registers its view element, the addon adds one capture mousedown (or touchstart) listener per registration (src/main/addon/GridDragScroll.mjs:386–402), and one window keeps all registrations in one map.

The Problem

Read from the code; no spec covers a grid inside another grid's view yet, so the red-first spec below is the first observation.

  • onDragStart takes the first registration whose view element is in the event path (GridDragScroll.mjs:239–246). A press inside a grid that sits in another grid's view, for example in a component cell or in content a package hosts in the view, has both view elements in its path. The map's insertion order decides, not the nesting. The outer grid usually registered first, so the drag scrolls the outer grid.
  • Its capture listener sits on both elements, so one press runs onDragStart twice. The second run overwrites mouseDownTimeout without clearing the first timer (:275–297). When the button comes up within the delay, onMonitorEnd clears only the second timer and sets monitorDrag to null (:323–324). The first timer then calls onMonitorMove, which reads monitor.startX of null (:304–315).
  • A press-drag on non-row content inside a view, such as text in an input that a component in the view renders, starts a drag-scroll too. The handler only skips neo-draggable, neo-grid-editor and the scrollbars (:254–264).

The Architectural Reality

  • Design authority: the addon's class JSDoc, "It listens for mousedown or touchstart on the grid body". The grid pressed is the grid scrolled.
  • Prior fixes in the same addon: #18065, #18099, #18104, #19820.

The Fix

  • Resolve the registration from the innermost registered view in the path.
  • Start a drag only for a press on that grid's own rows: the path holds a .neo-grid-row whose nearest .neo-grid-view is the registration's element.
  • Handle one press once, so no second timer is armed.

Acceptance Criteria

  • Red first, then green: in a grid whose view hosts a second grid, a press-drag on the inner grid's rows scrolls the inner grid only (component or e2e spec).
  • A press-drag on the outer grid's rows still scrolls the outer grid.
  • A click inside the inner grid, with the button up within the addon's delay, logs no error.
  • A press-drag inside a text input that a grid's view hosts outside its rows selects text and scrolls nothing.
  • The existing drag-scroll specs stay green.

Out of Scope

  • Kinetic tuning; touch gestures beyond the press that starts a drag.

Related

#20667 · #18065, #18099, #18104, #19820.

Good first issue: the change is local to src/main/addon/GridDragScroll.mjs. Its unit spec drives the addon with EventTarget stand-ins, and a component spec drives a real grid: run npm run test-unit -- test/playwright/unit/main/addon/GridDragScroll.spec.mjs and npm run test-components -- test/playwright/component/grid/DragScrollNativeDrag.spec.mjs.

Live latest-open + closed sweep: the latest 20 open (43 open, orange band; filed as a leaf of #20667) and all-state searches ("GridDragScroll", "drag scroll nested", "nested grid", "grid inside grid") at 2026-11-13T23:43Z: the closed addon lineage above covers no nested registration; no equivalent or prior exclusion found. A2A in-flight claim sweep: the last 30 messages over all read states (22:40–23:38Z) hold no claim on this scope. MC sweep: one query at filing on both symptoms ("…a press inside a grid nested in another grid drag-scrolls the outer grid", 10 results): no prior decision; the closest hit, a drag-to-scroll fix for cancelable touch events in src/main/DomEvents.mjs, does not touch nested registrations. Own-assignment sweep: 2 open, none overlapping.

unowned-rationale: Ready for a contributor; maintainers provide planning and review.

Origin Session ID: f576135c-7b1a-429b-8f66-4762c0094b18

Retrieval Hint: "GridDragScroll: a press in a nested grid scrolls the outer grid; one press arms two timers"

🖖 Grace (Claude Opus 5.5, Claude Code)

nabeelbaghoor cross-referenced by PR #20921 on Nov 14, 2026, 1:57 AM
nabeelbaghoor referenced in commit 022e3fc - "fix(grid): a press on the grid body itself still drag-scrolls (#20912)" on Nov 14, 2026, 2:43 AM
tobiu referenced in commit 5e66b40 - "fix(grid): drag-scroll only the grid whose rows were pressed (#20912) (#20921) on Nov 14, 2026, 1:52 PM
tobiu closed this issue on Nov 14, 2026, 1:52 PM