Skip to content

fix(mobile): focusing the language search no longer zooms the page in on iPhone (v0.21.4) #340

Description

@MerciHanrim

The bug

On an iPhone, opening the language menu from the phone's ⋯ sheet and tapping its search field zooms the page in; after typing, choosing or cancelling a language and closing the menu, the page stays zoomed, and it has to be pinched back to its normal scale by hand. Reported by Hanrim on iPhone Safari (v0.21.3, production).

  • The cause fits iOS Safari's automatic zoom: Safari zooms in to any text field whose font size is under 16 px when it takes focus, and does not zoom back out when the keyboard or the menu closes.
  • Measured on production (v0.21.3) in Chrome with a phone layout (390 × 844, touch): the language search field (.lang-menu__search) computes to 12 px (it takes font: inherit from its menu, 12 px on the phone). On the desktop it computes to 16 px.
  • The viewport meta has no maximum-scale or user-scalable, so pinch zoom works, as it should.

The fix (decided)

  • On the phone, the language search field's own computed font size is at least 16 px, so Safari has nothing to zoom for.
  • Zoom itself is never blocked: no maximum-scale=1, no user-scalable=no (they take pinch zoom away from people who need it), and no code that forces the page scale back.
  • The menu and its field stay inside the visible area above the keyboard while it is open.

Verification

  • An automated test: on the phone layout, the computed font size of the language search field, and of every other text field the phone can focus, is at least 16 px.
  • Android Chrome: no change in behaviour (it does not zoom on focus); the automated phone checks pass.
  • A real iPhone, Safari and the installed Home Screen app: focus the field, type, choose a language, and separately cancel and close the menu; after the keyboard closes the page is at its original scale and layout, and while the keyboard is open the menu and the field stay visible above it. The result of this check is recorded here and in the pull request.

Released together with #338 (the Controls rail) as v0.21.4, in the same pull request; an issue of its own for tracking and verification, not a version of its own. The special-silhouette work (#337) stays v0.21.5. Related: #330.

Activity

  1. changed the title [-]fix(mobile): focusing the language search no longer zooms the page in on iPhone (v0.21.5)[/-] [+]fix(mobile): focusing the language search no longer zooms the page in on iPhone (v0.21.4)[/+] on Oct 8, 2026
  2. MerciHanrim commented on Oct 8, 2026

    @MerciHanrim
    OwnerAuthor

    Real-device check on a real iPhone, by Hanrim, on the preview of #339 at 703f00d (v0.21.4 · 703f00d), where the phone's language search field computes to 16 px (12 px on production v0.21.3):

    • iPhone Safari: search, type, choose a language, close the menu; and search, type, cancel, close the menu. Both passed.
    • The Home Screen app installed from the preview: the same two paths. Both passed.
    • In all four runs the search field stayed visible above the keyboard, and after the menu closed the page was back at its original scale with no manual zoom-out.

    Zoom is not blocked anywhere: the viewport meta keeps no maximum-scale and no user-scalable=no. The fix ships with #338 as v0.21.4 in #339.

  3. MerciHanrim commented on Oct 8, 2026

    @MerciHanrim
    OwnerAuthor

    Shipped in v0.21.4 by #339, together with #338, squash-merged as 707fcc8 on 2026-10-08 at 16:55 Seoul time (07:55 UTC) from the approved head commit 703f00d; the two commits share the tree 823f8c3.

    • Scope delivered: under the mobile media query every text-like field (input of any type but checkbox, radio, range, file, colour, button, submit, reset and hidden; textarea; select) takes font-size: max(16px, 1em), so iOS Safari has nothing to zoom for; the language search, 12 px before, is 16 px. Zoom is never blocked: the viewport meta keeps no maximum-scale and no user-scalable=no, and nothing forces the page scale back. The desktop is unchanged.
    • Tests: a phone-project e2e test reads every visible text field's computed size on the canvas, in the More sheet, in the language menu (typing into the search and closing it), in the share panel and in the Monte-Carlo dialog; it failed without the rule. No screenshot baseline changed.
    • Real iPhone (Hanrim, on the preview at 703f00d): Safari and the Home Screen app, each with choosing a language and with cancelling; the search field stayed visible above the keyboard and the page returned to its original scale with no manual zoom-out, in all four runs (recorded above).
    • Pull request CI (run 37744530957 at 703f00d, attempt 1) and main CI (run 37746429564 at 707fcc8, attempt 1): every job passed, the aggregate e2e job included; the 2,034 listed tests each ran once, 2,027 passed, 7 skipped by design, 0 failed, 0 retried; the production bundle 16 of 16, the PWA 19 of 19.
    • Production: https://cozy-loop-studio.pages.dev serves v0.21.4 · build 707fcc8; in a phone layout the language search field computes to 16 px (12 px on v0.21.3), and on the desktop 16 px as before.

    Android Chrome does not zoom on focus; the automated phone checks pass, and nothing else changed for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions