Restore pointer cursor on worktree cards (#2509)

This commit is contained in:
Neil
2026-05-21 01:47:02 -07:00
committed by GitHub
parent 789f71890e
commit 41e2e65cfc
2 changed files with 2 additions and 2 deletions
@@ -485,7 +485,6 @@ const WorktreeCard = React.memo(function WorktreeCard({
? 'border border-sidebar-ring/35 bg-sidebar-accent/70 ring-1 ring-sidebar-ring/30'
: 'border border-transparent hover:bg-sidebar-accent/40',
isActiveSurface && isMultiSelected && 'ring-1 ring-sidebar-ring/35',
!nativeDragEnabled && !isDeleting && '!cursor-grab',
isDeleting && 'opacity-50 grayscale cursor-not-allowed',
isSshDisconnected && !isDeleting && 'opacity-60'
)}
@@ -25,7 +25,8 @@ export function isSidebarPointerDragBlocked(target: EventTarget | null, row: HTM
}
export function setSidebarPointerDragDocumentStyles(enabled: boolean): void {
document.body.style.cursor = enabled ? 'grabbing' : ''
// Why: sidebar cards are click-first; the drop line/preview show drag state
// without replacing the normal pointer cursor while crossing targets.
document.body.style.userSelect = enabled ? 'none' : ''
document.documentElement.toggleAttribute(POINTER_DRAGGING_ATTR, enabled)
}