Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/AppShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ function RegionSelectorPanel() {
return (
<>
<div className="sticky -top-1 z-10 -mt-1 bg-bg-raised px-2 pt-1 pb-1.5">
{/* Keep focused text at 16px so iOS Safari does not zoom the page. */}
<input
ref={inputRef}
type="text"
Expand All @@ -212,7 +213,7 @@ function RegionSelectorPanel() {
}
}}
placeholder="Filter IATA or name…"
className="w-full text-[11px] font-mono bg-bg-surface border border-border rounded px-2 py-1 text-text-bright placeholder:text-text-dim"
className="w-full text-[16px] font-mono bg-bg-surface border border-border rounded px-2 py-1 text-text-bright placeholder:text-text-dim"
/>
</div>

Expand Down
13 changes: 13 additions & 0 deletions tests/browser/region-input-zoom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Open REGION, then run in a real browser at phone, tablet and desktop widths.
// jsdom does not load Tailwind's generated CSS; inspect the rendered input instead.
// Also check on iOS Safari: opening, filtering and closing must leave zoom unchanged.
(function checkRegionInputZoom() {
const input = document.querySelector('header input[placeholder="Filter IATA or name…"]');
if (!input) throw new Error("Open the region picker first");
const fontSize = Number.parseFloat(getComputedStyle(input).fontSize);
if (fontSize < 16 || !Number.isFinite(fontSize)) {
throw new Error(`Region filter is ${fontSize}px; small focused inputs can trigger Safari zoom`);
}
if (document.activeElement !== input) throw new Error("Region filter did not receive focus");
return { viewport: document.documentElement.clientWidth, fontSize, focused: true };
})();
Loading