Skip to content

Commit d65efb3

Browse files
fix(web): holding a dragged thread near the sidebar bottom no longer makes the list jump
Projected drag rows count toward the list's scroll range, so the range shrank whenever the drop target changed. The browser clamped scrollTop, rows moved under the still pointer, and the target flipped back in a loop with auto-scroll. Reserve the largest projected overflow for the whole drag so the range stays constant. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e4df6b9 commit d65efb3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/web/src/components/Sidebar.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3299,6 +3299,10 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
32993299
"relative flex flex-col gap-px",
33003300
sidebarListItems.length > 0 && "flex-1",
33013301
actionSweep !== null && "**:pointer-events-none",
3302+
// Projected rows (two boundary labels, two hints) extend the scroll range; a range that
3303+
// shrinks as the target changes clamps scrollTop and flips the target under a still pointer.
3304+
dragState !== null &&
3305+
"after:pointer-events-none after:absolute after:inset-x-0 after:-bottom-30 after:h-px after:content-['']",
33023306
)}
33033307
>
33043308
{(() => {

0 commit comments

Comments
 (0)