Restore pointer cursor on worktree cards (#2509)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user