Skip to content

[Bug]: iOS Safari keyboard hides the web composer and scrolls the header off-screen #19512

Open

Description

@Trevor-Compaytence

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open the T3 Code web client in Safari on an iPhone (portrait).
  2. Open a thread and tap the composer so the on-screen keyboard opens.

Expected behavior

The header stays at the top of the screen and the composer sits directly above the keyboard, with the timeline shrinking in between (what Chromium already does via interactive-widget=resizes-content).

Actual behavior

iOS Safari ignores interactive-widget=resizes-content. The keyboard only shrinks visualViewport and Safari pans the page to reveal the field, so:

  • the header (sidebar toggle, title, panel controls) scrolls off the top of the screen;
  • the composer's bottom row (model picker, send) ends up behind the keyboard, because the shell and route insets are sized with h-dvh/h-svh, which iOS does not shrink for the keyboard.

Impact

Major degradation or frequent failure

Version or commit

Nightly 0.0.46-nightly.20261013.3066; also on main at 7ac952c.

Environment

iPhone, iOS Safari, portrait. Screenshots below are from Chrome iPhone emulation (390x844 and 360x780) with a 336px keyboard simulated by stubbing window.visualViewport and panning the page the way Safari does.

Screenshots, recordings, or supporting files

Keyboard open (390 wide) Keyboard open (360 wide)

Measured with the keyboard open at 390x844: header at y = -279 to -227 (off-screen); composer form bottom at 549 while the keyboard starts at 508.

Workaround

None in Safari. Closing the keyboard restores the layout.

Activity

  1. added
    needs more info
    and removed
    needs more info
    on Oct 22, 2026
  2. kaovilai commented on Nov 4, 2026

    @kaovilai
    Contributor

    On an iPad this is the same defect, and it is still there on main and on #19513.

    iPad Air landscape, 1080x810 window (desktop-width layout), keyboard covering the bottom 320px:

    state composer / menu terminal drawer
    keyboard closed 679..790, hidden 0px — —
    main 679..790, hidden 300px 495..696, hidden 206px 530..810, hidden 320px
    #19513 head 646..790, hidden 300px hidden 173px hidden 320px
    Chromium resizes-content (Android/desktop) hidden 0px — —

    data-viewport-sync is unset on both main and #19513's head at that size: the gate is (max-width: 639px) and (pointer: coarse), so nothing runs on a tablet. The shell stays h-dvh, the command-menu layer is positioned from window.innerHeight, and the terminal drawer is bottom-anchored, so all three sit under the keyboard. While typing, the caret is 225px below the visible area, which is the pan Safari applies on every caret move.

    Two ways to see it:

    The only thing emulated is which viewport the platform keyboard shrinks: window.visualViewport is stubbed while innerHeight and documentElement.clientHeight keep their values, which is what iPadOS does. The HTML/CSS/JS under test is the shipped app.

    Fix direction: widen #19513's gate from portrait phones to any coarse-pointer device so its data-viewport-sync rules cover tablets, and have ComposerCommandMenuLayer re-measure on visualViewport resize/scroll (it listens to window resize/scroll only), since the menu is portaled to body and bottom-anchored to the layout viewport.

    Note

    Responses generated with Claude (model: Claude Opus 5.5)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions