Skip to content

Commit 37481f0

Browse files
fix(web): dragging a sidebar thread no longer scrolls the list out from under the pointer (#30346)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 4aab23c commit 37481f0

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

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

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

‎apps/web/src/components/sidebar/SidebarListMarkers.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ export function SidebarSectionPlaceholder(props: {
5656
marker={props.marker}
5757
data-testid={`sidebar-${props.marker}`}
5858
className="relative mx-0.5 -mb-px h-0"
59-
revealOverflow={props.marker === "settled-placeholder" && props.showHint}
59+
// Revealing on every drag scrolls the list out from under the pointer.
60+
revealOverflow={
61+
props.marker === "settled-placeholder" && props.showHint && props.isDropTarget
62+
}
6063
>
6164
{props.showHint ? (
6265
<div

0 commit comments

Comments
 (0)