fix(rack): ensure dnd-kit DragOverlay ignores pointer events to fix hit-testing

This commit is contained in:
2026-03-22 11:37:14 -05:00
parent df04bb2c78
commit a13c52d3e3
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ function PaletteItem({ type }: { type: ModuleType }) {
{...listeners}
{...attributes}
className={cn(
'flex items-center gap-2 px-2 py-1.5 rounded border text-left w-full cursor-grab active:cursor-grabbing transition-all select-none',
'flex items-center gap-2 px-2 py-1.5 rounded border text-left w-full cursor-grab active:cursor-grabbing transition-all select-none touch-none',
colors.bg,
colors.border,
isDragging ? 'opacity-40' : 'hover:brightness-125'

View File

@@ -277,7 +277,7 @@ export function RackPlanner() {
</div>
</div>
<DragOverlay dropAnimation={null}>
<DragOverlay dropAnimation={null} className="pointer-events-none" zIndex={999} style={{ pointerEvents: 'none' }}>
{activePaletteType && <DragOverlayItem type={activePaletteType} />}
{activeDragModuleLabel && <ModuleDragOverlay label={activeDragModuleLabel} />}
</DragOverlay>