mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
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:
parent
9b01c74f00
commit
1e355116a1
1 changed files with 9 additions and 1 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue