Skip to content
TypeScript

fix(web): keep the slash menu above the composer when vertical space is short (#9625)

Igor Makowski120fab18d84f
diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx
index 946d150bb0a..5074d8a27c8 100644
--- a/apps/web/src/components/chat/ChatComposer.tsx
+++ b/apps/web/src/components/chat/ChatComposer.tsx
@@ -758,7 +758,7 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children:
return createPortal(
<div
- className="pointer-events-auto fixed z-40"
+ className="pointer-events-auto fixed z-40 flex flex-col"
data-composer-drawer-layer="true"
style={{
bottom: position.bottom,
diff --git a/apps/web/src/components/chat/ComposerCommandMenu.tsx b/apps/web/src/components/chat/ComposerCommandMenu.tsx
index 74cd98f361b..8e940969e72 100644
--- a/apps/web/src/components/chat/ComposerCommandMenu.tsx
+++ b/apps/web/src/components/chat/ComposerCommandMenu.tsx
@@ -91,11 +91,11 @@ export const ComposerCommandMenu = memo(function ComposerCommandMenu(props: {
>
<ComposerBanner.Surface
ref={listRef}
- className="w-full overflow-hidden pb-(--chat-composer-attachment-overlap) **:data-[slot=scroll-area-scrollbar]:data-[orientation=vertical]:my-4"
+ className="flex min-h-0 w-full flex-col overflow-hidden pb-(--chat-composer-attachment-overlap) **:data-[slot=scroll-area-scrollbar]:data-[orientation=vertical]:my-4"
data-composer-command-drawer="true"
>
{props.items.length > 0 ? (
- <CommandList className="max-h-72 scroll-pb-6">
+ <CommandList className="max-h-72 min-h-0 scroll-pb-6">
<CommandGroup>
{props.items.map((item) => (
<ComposerCommandMenuItem