fix(site/src/pages/AgentsPage/components/ChatElements): keep model picker visible above mobile keyboard (#26964)

This commit is contained in:
Danielle Maywood
2026-07-02 12:47:01 +01:00
committed by GitHub
parent 843754a547
commit 8bcc24f032
@@ -136,10 +136,20 @@ export const ModelSelector: FC<ModelSelectorProps> = ({
align={dropdownAlign}
className={cn(
enableMobileFullWidthDropdown &&
"mobile-full-width-dropdown mobile-full-width-dropdown-bottom",
"mobile-full-width-dropdown mobile-full-width-dropdown-above-composer",
"w-72 overflow-hidden border-border-default p-0",
contentClassName,
)}
onOpenAutoFocus={(event) => {
// On touch devices, auto-focusing the search input pops the
// software keyboard as soon as the picker opens, hiding the
// model list behind it. Only keep the WAI-ARIA combobox
// focus-into-input behavior for fine pointers (keyboard and
// mouse users on desktop).
if (matchMedia("(pointer: coarse)").matches) {
event.preventDefault();
}
}}
>
<Command
shouldFilter={false}