A model menu that stays on the phone

Inside a chat the picker sits mid-bar with the panel buttons to its right,
and its menu opened from the picker's right edge -- at 390px it spanned
x = -132..226, cutting every model's name off. Below 48rem the bar is now
the containing block and the menu is pinned between its edges (capped at
24rem). Opening it on a touchscreen no longer focuses the filter, which
raised the keyboard over half the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 20:36:45 +00:00
co-authored by Claude Opus 5.5
parent da43bc1459
commit 793f9c8cad
6 changed files with 75 additions and 1 deletions
+5
View File
@@ -320,6 +320,11 @@
if (filter) {
filter.value = "";
applyFilter(menu, "");
}
// Not on a touchscreen: focusing a text field there raises the keyboard,
// which covers half the list the finger came to choose from. The filter
// is one tap away for whoever wants it.
if (filter && !window.matchMedia("(hover: none)").matches) {
filter.focus();
} else {
var selected = menu.querySelector(".picker__option.is-selected") ||