The same chat screen in iOS Safari. Left: the usual full-height flex column. Right: wrapped in steady-keyboard. Replayed from frame-by-frame measurements on an iPhone (iOS 27): layout viewport 695 px, keyboard 330 px.
Safari pans the page to reveal the field
The shell makes room before Safari looks
resize (+95 ms). When Safari checks at +200 ms, the field already sits above the keyboard: nothing to reveal, no pan.scrollTo(0, 0)) instead of following it. Following it is the classic "jump, then squish".import { useKeyboardShell, focusWithoutScroll }
from "steady-keyboard/react";
import "steady-keyboard/shell.css";
function App() {
useKeyboardShell({ storagePrefix: "my-app" });
return (
<div className="keyboard-shell">
<header>…</header>
<main style={{ flex: 1, overflowY: "auto" }}>…</main>
<form data-keyboard-bar>
<textarea onTouchEnd={focusWithoutScroll} />
</form>
</div>
);
}
tap → focusin +95 ms visual viewport shrinks 695 → 365 +200 ms pans the page up 330 px, only if the focused field is still below the keyboard ~300 ms keyboard and pan finish first keyboard after a load: resize and pan arrive together at ~930 ms
A replay of the measured behaviour, drawn in the browser. To see the real thing, open /demo/ on an iPhone, and /demo/?fix=off for the same page without the fix. Locally: pnpm dev.