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}
|
{...listeners}
|
||||||
{...attributes}
|
{...attributes}
|
||||||
className={cn(
|
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.bg,
|
||||||
colors.border,
|
colors.border,
|
||||||
isDragging ? 'opacity-40' : 'hover:brightness-125'
|
isDragging ? 'opacity-40' : 'hover:brightness-125'
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ export function RackPlanner() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DragOverlay dropAnimation={null}>
|
<DragOverlay dropAnimation={null} className="pointer-events-none" zIndex={999} style={{ pointerEvents: 'none' }}>
|
||||||
{activePaletteType && <DragOverlayItem type={activePaletteType} />}
|
{activePaletteType && <DragOverlayItem type={activePaletteType} />}
|
||||||
{activeDragModuleLabel && <ModuleDragOverlay label={activeDragModuleLabel} />}
|
{activeDragModuleLabel && <ModuleDragOverlay label={activeDragModuleLabel} />}
|
||||||
</DragOverlay>
|
</DragOverlay>
|
||||||
|
|||||||
Reference in New Issue
Block a user