Context
Found while shooting #21627's frames on #21743. After the last ticket of New was dragged into Triage, New sat about one window (110 cards) above the end the drag started from. A per-frame probe of the column body in headless Chromium at 1440 × 900, on dev ac0823329b:
- A sliced column,
examples/board/bigData New (6,200 cards), scrolled to its end. On the first drag move, scrollTop goes from 576458 to 566225 while scrollHeight falls to 566993. That's the top spacer (566977 px) plus 16 px: the 110 cards are still in the DOM but take no layout height. The height returns a few frames later; the scroll position doesn't.
- A plain column,
examples/board/multiSelect Inbox (40 reports), scrolled to its end. A drag start takes scrollTop from 2560 to 0, with a max of 0. After Escape the max is 2560 again, and scrollTop stays 0.
The Problem
A user who scrolls a column and drags a card out of it loses their place. When the drag ends, by a drop or a cancel, the column shows its top (plain) or one window above the start (sliced). During the drag the cards look right, because they're placed relative to the body's box and the box now shows its top. So the jump shows only when the drag ends. #21627's catalog move ("scroll the first column to its end, then drag its last card into another column") runs straight into it.
The Architectural Reality
SortZone#beginColumnSort (src/board/SortZone.mjs:136) pins the body to its box height (bodyRect.height, position: relative). It then moves every card to position: absolute at top: rect.y - bodyRect.y, an offset relative to the box, with the zone's own scrollTop set to 0.
- With the cards out of flow, the body's scroll content shrinks to its non-card children (a sliced column's spacers, or nothing), and the browser clamps
scrollTop to the new maximum.
- Restoring flow at the drag's end re-grows the content but never restores the offset.
- The base
src/draggable/container/SortZone.mjs snapshots its owner's horizontal scroll (scrollLeft, in owner-content pixels). The board's vertical sort has no scrollTop equivalent.
- Design authority:
Column#selectWindow (src/board/Column.mjs, from #21721): "Once the drag lets go, the window returns to the scroll position it was held away from, or the viewport would show its spacer." A drag keeps the user's scroll position as its reference.
The Fix
In beginColumnSort, read the body's scrollTop together with its rects, and keep the scroll content intact while the cards are out of flow:
- place each card at its content offset (
rect.y - bodyRect.y + scrollTop);
- hold the cards' in-flow height for the length of the drag, e.g. a
min-height on the body's items root equal to the cards' summed height, released where the drag restores the column, so the browser never clamps.
Cover both column kinds in a spec that fails on dev.
Acceptance Criteria
Out of Scope
Auto-scroll while dragging near a column's edge. The board's horizontal scroll.
Avoided Traps
- Restoring
scrollTop after the drag ends: a jump back after a visible jump, and the drag's own frames would still show the wrong region. Keep the content height instead.
- Fixing only sliced columns: the plain column shows the same defect.
Related
#20874 (parent) · #21721 (its post-merge validation found this) · #21743 (frames show it) · #21734 (multi-select, merged)
Live latest-open + closed sweep: latest 20 open read, plus open and closed search ("board column drag scroll", "board column drag scroll jump"), at 2026-11-21T05:30Z; no equivalent, no prior exclusion. 74 open (red band), so it is filed as a leaf of #20874. A2A in-flight sweep: latest 30 messages, all read-states; no claim on this scope. MC sweep: one query on the symptom ("column jumps back to its top after dragging a card out of a scrolled column"), 5 results, no prior decision. Own-assignment sweep: 9 open, none overlapping.
Decision Record impact: none.
Origin Session ID: bdba2a79-6341-441f-b806-a8c2a903e1cb
Retrieval Hint: "board column drag start scroll jump, beginColumnSort absolute cards, scrollTop clamped to collapsed content"
Context
Found while shooting #21627's frames on #21743. After the last ticket of New was dragged into Triage, New sat about one window (110 cards) above the end the drag started from. A per-frame probe of the column body in headless Chromium at 1440 × 900, on dev
ac0823329b:examples/board/bigDataNew (6,200 cards), scrolled to its end. On the first drag move,scrollTopgoes from 576458 to 566225 whilescrollHeightfalls to 566993. That's the top spacer (566977 px) plus 16 px: the 110 cards are still in the DOM but take no layout height. The height returns a few frames later; the scroll position doesn't.examples/board/multiSelectInbox (40 reports), scrolled to its end. A drag start takesscrollTopfrom 2560 to 0, with a max of 0. AfterEscapethe max is 2560 again, andscrollTopstays 0.The Problem
A user who scrolls a column and drags a card out of it loses their place. When the drag ends, by a drop or a cancel, the column shows its top (plain) or one window above the start (sliced). During the drag the cards look right, because they're placed relative to the body's box and the box now shows its top. So the jump shows only when the drag ends. #21627's catalog move ("scroll the first column to its end, then drag its last card into another column") runs straight into it.
The Architectural Reality
SortZone#beginColumnSort(src/board/SortZone.mjs:136) pins the body to its box height (bodyRect.height,position: relative). It then moves every card toposition: absoluteattop: rect.y - bodyRect.y, an offset relative to the box, with the zone's ownscrollTopset to0.scrollTopto the new maximum.src/draggable/container/SortZone.mjssnapshots its owner's horizontal scroll (scrollLeft, in owner-content pixels). The board's vertical sort has noscrollTopequivalent.Column#selectWindow(src/board/Column.mjs, from #21721): "Once the drag lets go, the window returns to the scroll position it was held away from, or the viewport would show its spacer." A drag keeps the user's scroll position as its reference.The Fix
In
beginColumnSort, read the body'sscrollToptogether with its rects, and keep the scroll content intact while the cards are out of flow:rect.y - bodyRect.y + scrollTop);min-heighton the body's items root equal to the cards' summed height, released where the drag restores the column, so the browser never clamps.Cover both column kinds in a spec that fails on dev.
Acceptance Criteria
scrollTopunchanged through the drag and after a cancel, for a plain column and for a sliced one.test/playwright/asserts both and fails on dev before the fix.Out of Scope
Auto-scroll while dragging near a column's edge. The board's horizontal scroll.
Avoided Traps
scrollTopafter the drag ends: a jump back after a visible jump, and the drag's own frames would still show the wrong region. Keep the content height instead.Related
#20874 (parent) · #21721 (its post-merge validation found this) · #21743 (frames show it) · #21734 (multi-select, merged)
Live latest-open + closed sweep: latest 20 open read, plus open and closed search ("board column drag scroll", "board column drag scroll jump"), at 2026-11-21T05:30Z; no equivalent, no prior exclusion. 74 open (red band), so it is filed as a leaf of #20874. A2A in-flight sweep: latest 30 messages, all read-states; no claim on this scope. MC sweep: one query on the symptom ("column jumps back to its top after dragging a card out of a scrolled column"), 5 results, no prior decision. Own-assignment sweep: 9 open, none overlapping.
Decision Record impact: none.
Origin Session ID: bdba2a79-6341-441f-b806-a8c2a903e1cb
Retrieval Hint: "board column drag start scroll jump, beginColumnSort absolute cards, scrollTop clamped to collapsed content"