From 1e355116a1ff3efffb163ce41218055b19ba4f4c Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Tue, 28 Jul 2026 19:20:07 -0500 Subject: [PATCH] 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. --- .../src/app/chat/composer/hooks/use-popout-drag.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/app/chat/composer/hooks/use-popout-drag.ts b/apps/desktop/src/app/chat/composer/hooks/use-popout-drag.ts index e4a53889e5ba..4af646040436 100644 --- a/apps/desktop/src/app/chat/composer/hooks/use-popout-drag.ts +++ b/apps/desktop/src/app/chat/composer/hooks/use-popout-drag.ts @@ -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. */