fix(rack): ensure dnd-kit DragOverlay ignores pointer events to fix hit-testing
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user