fix(desktop): keep composer chrome out of the pop-out gesture

The pill strips live inside the composer root, so their box sits within
the drag region and their gaps read as grab area. Exclude anything
marked composer-no-drag, matching how buttons and menu items are already
excluded.
This commit is contained in:
Brooklyn Nicholson 2026-07-28 19:20:07 -05:00
parent 9b01c74f00
commit 1e355116a1

View file

@ -49,7 +49,15 @@ function gestureTargetOk(target: EventTarget | null) {
return false
}
return !target.closest('button, a, input, textarea, select, [role="menuitem"], [data-radix-popper-content-wrapper]')
// `composer-no-drag`: chrome that lives inside the composer root but isn't
// part of the draggable frame — the floating pill strips. The pills are
// `button`s and already excluded, but the strip's own box (the gaps between
// pills) isn't, so without this a press landing between two badges still
// drags. The strips are `w-fit`, so this costs the grab band only the width
// of the badges themselves.
return !target.closest(
'button, a, input, textarea, select, [role="menuitem"], [data-radix-popper-content-wrapper], [data-slot="composer-no-drag"]'
)
}
/** Floating composer's 5px outer frame — grab here to drag without long-press. */