mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-11 12:17:45 +02:00
[aidan] bug: fix schedule button
This commit is contained in:
@@ -343,7 +343,12 @@ const DashboardToolbar = React.forwardRef<HTMLDivElement, Props>(
|
||||
if (Math.abs(dx) > DRAG_THRESHOLD || Math.abs(dy) > DRAG_THRESHOLD) return;
|
||||
|
||||
const el = target instanceof Element ? target : (target as Node).parentElement;
|
||||
if (el?.closest('[role="dialog"], [role="presentation"], .MuiModal-root, .MuiPopover-root')) {
|
||||
// The New Chat / Schedule pill row renders OUTSIDE containerRef, so a
|
||||
// pill click counts as "outside" and used to fire handleDismiss on
|
||||
// mouseup. That closed the composer (inputOpen=false), which unmounted
|
||||
// the pill row before its click landed, so Schedule's onClick never ran
|
||||
// ("Schedule does nothing"). Exempt the pills; they own their own onClick.
|
||||
if (el?.closest('[role="dialog"], [role="presentation"], .MuiModal-root, .MuiPopover-root, [data-toolbar-pills]')) {
|
||||
return;
|
||||
}
|
||||
if (elementSelection?.selectMode && el?.closest('[data-select-type]')) {
|
||||
@@ -418,7 +423,7 @@ const DashboardToolbar = React.forwardRef<HTMLDivElement, Props>(
|
||||
// Image #54: paired mode pills above the composer/popover.
|
||||
// The two states are mutually exclusive: opening one closes the
|
||||
// other so the body underneath only renders one thing at a time.
|
||||
<Box sx={{ display: 'flex', gap: 0.5, mb: 0.75, pl: 0.25 }}>
|
||||
<Box data-toolbar-pills sx={{ display: 'flex', gap: 0.5, mb: 0.75, pl: 0.25 }}>
|
||||
<Box
|
||||
onClick={() => {
|
||||
if (historyOpen) {
|
||||
|
||||
Reference in New Issue
Block a user