Skip to content

Reset .card-columns vertical scroll on drag end (#2964) - #3004

Open
JoeJoeflyn wants to merge 1 commit into
basecamp:mainfrom
JoeJoeflyn:fix/reset-vertical-scroll-on-drag-end
Open

Reset .card-columns vertical scroll on drag end (#2964)#3004
JoeJoeflyn wants to merge 1 commit into
basecamp:mainfrom
JoeJoeflyn:fix/reset-vertical-scroll-on-drag-end

Conversation

@JoeJoeflyn

@JoeJoeflyn JoeJoeflyn commented Jul 28, 2026

Copy link
Copy Markdown

Problem

After dragging a card, empty columns' "Drag cards here" drop zones can peek out at the bottom and push the column headings up, leaving the board stuck until a full page refresh (#2964).

Root cause

.card-columns is overflow-y: hidden but still a scroll container. Empty columns' blank-slate placeholders hang past its bottom edge (clipped by the hidden overflow), and browser-internal scrolling (e.g. drag auto-scroll on some Chrome/Edge builds) can offset scrollTop, which is never reset.

Fix

Reset scrollTop to 0 in dragEnd. There is never a legitimate vertical scroll, so this is always safe.

Testing

Verified on the dev board: after a drag, document.querySelector(".card-columns").scrollTop is 0. Forcing the stuck state (scrollTop = 9999) then dragging any card snaps it back and unsticks the board.

Closes #2964.

screenrecording-2026-07-28_20-42-56.mp4

After dragging a card, empty columns' "Drag cards here" drop zones can
peek out at the bottom of the board and push the column headings up,
leaving the board stuck until a full page refresh (basecamp#2964).

.card-columns is overflow-y: hidden, so it is never meant to scroll
vertically. But empty columns' blank-slate placeholders hang past its
bottom edge (clipped by the hidden overflow), and the container is
still scrollable by browser-internal scrolling such as drag auto-scroll,
which some Chrome/Edge builds trigger. Once scrollTop is offset it is
never reset, so the clipped slates become visible and the board is stuck.

Pin scrollTop back to zero in dragEnd. Since overflow-y: hidden means
there is never a legitimate vertical scroll, this is always safe and
unsticks the board regardless of what offset it.

Closes basecamp#2964.
Copilot AI review requested due to automatic review settings July 28, 2026 13:45

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses an environment-specific board “stuck” state after drag-and-drop by forcibly resetting vertical scroll on the .card-columns container at the end of a drag. This hardens the drag lifecycle against browser-internal/programmatic vertical scrolling, which is not a supported interaction because the container is overflow-y: hidden.

Changes:

  • Reset scrollTop to 0 in dragEnd to prevent empty-column drop zones from peeking out and shifting headings after a drag.
  • Document the rationale inline, tying the behavior to overflow-y: hidden and issue #2964.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Board drag-and-drop: "Drag cards here" drop zones don't collapse after dragging a card (Chrome on Windows)

2 participants