mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-12 04:37:44 +02:00
[eric] dashboard: fix empty-state composer, stop canvas eating the pointerdown so it can focus
This commit is contained in:
@@ -63,7 +63,13 @@ const DashboardEmptyState: React.FC<{
|
||||
pointerEvents: 'none', px: 3,
|
||||
}}
|
||||
>
|
||||
<Box sx={{ width: '100%', maxWidth: 620, pointerEvents: 'auto', display: 'flex', flexDirection: 'column' }}>
|
||||
{/* Swallow pointerdown so the canvas's pan/marquee handler doesn't preventDefault the press and
|
||||
steal focus from the composer, that's why clicking the input did nothing. Clicks/typing still work. */}
|
||||
<Box
|
||||
onPointerDown={(e) => e.stopPropagation()}
|
||||
onMouseDown={(e) => e.stopPropagation()}
|
||||
sx={{ width: '100%', maxWidth: 620, pointerEvents: 'auto', display: 'flex', flexDirection: 'column' }}
|
||||
>
|
||||
<Typography sx={{ color: c.text.primary, fontSize: c.font.size.display, fontWeight: 600, textAlign: 'center', letterSpacing: '-0.01em', mb: 3 }}>
|
||||
What do you want done?
|
||||
</Typography>
|
||||
|
||||
Reference in New Issue
Block a user