Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

spec(AST-099): Core text inputs stay above the on-screen keyboard (#9750)

Cindy Zhang65516e64937a
diff --git a/docs/architecture/react-component-runtime.md b/docs/architecture/react-component-runtime.md
index 56838fde56..75d67d2e00 100644
--- a/docs/architecture/react-component-runtime.md
+++ b/docs/architecture/react-component-runtime.md
@@ -19,6 +19,7 @@ deciding_specs:
[
spec:AST-086/DEC-2,
spec:AST-099/DEC-1,
+ spec:AST-099/DEC-5,
spec:AST-105/DEC-1,
spec:AST-107/DEC-2,
]
@@ -171,27 +172,53 @@ those contracts.
adopting components hold no Effect, observer, timer, or
listener of their own to detect page load, read rendered text, or write that
announcement. The module follows INV3 and INV5.
-- **INV11 — The on-screen keyboard has one owner.** In `@astryxdesign/core`,
- one shared internal hook in the keyboard module (`packages/core/src/keyboard/`)
- measures the on-screen keyboard, keeps the page
- from panning on focus, and dismisses the keyboard when a surface moves
- (`spec:AST-099`); it is not exported. The keyboard height and each keyboard
- change's transition (start time, resting value, curve) reach styles only as
- the hook's value and live only in the hook: each consumer applies them
- through a StyleX functional style on its own element, and no CSS custom
- property on the document root or a shared ancestor carries them. No Core
- component keeps its own visual-viewport listener for the keyboard. The hook
- publishes each keyboard change as one transition: a start time, a resting
- value, and a curve. Every Core consumer that rides the keyboard rides that
- transition with compositor animations, a translate to the resting value,
- never JavaScript per frame, and the hook makes at most one layout read per
- keyboard change. A component outside Core does not ride; it commits the
- resting value once. Packages outside Core cannot import the hook; a
- component there that responds to the keyboard keeps one listener that
- measures as `spec:AST-099` FR2 defines, keeps focus from panning as FR4
- does, blurs as FR5 does, applies the height through a functional style on
- its own elements, and follows INV3 and INV5. The hook follows INV3 and
- INV5.
+- **INV11 — The on-screen keyboard has one owner.** In `@astryxdesign/core`, one
+ shared internal hook in the keyboard module (`packages/core/src/keyboard/`)
+ measures the on-screen keyboard, keeps the page from panning on focus, and
+ dismisses the keyboard when a surface moves (`spec:AST-099`); it is not
+ exported. The keyboard height and each keyboard change's transition (start
+ time, resting value, curve) reach styles only as the hook's value and live
+ only in the hook: each consumer applies them through a StyleX functional style
+ on its own element, and no CSS custom property on the document root or a
+ shared ancestor carries them. The keyboard module may also write, and remove,
+ a CSS `translate` on the nearest fixed-position ancestor of a focused Core
+ field when that ancestor does not fill the viewport, its layout box before any
+ transform sits at the viewport's bottom edge, its own computed `translate`,
+ the value the app sets and not the module's own, is `none`, and no CSS
+ transition or animation of the app's own on its position is running when the
+ module measures (the module's own ride does not count) (`spec:AST-099` FR9).
+ The translate equals the distance from the ancestor's bottom edge as drawn,
+ after the app's own lift, to the keyboard's top; the module measures it after
+ each keyboard report, including a height change while focus stays in the bar,
+ and each focus move, once the page's own listeners have run, so a bar the app
+ already lifts gets none; when the moved box would not fit in the room above
+ the keyboard, the module writes no translate if a scroller holds the field,
+ and otherwise translates only as far as the focused field needs to clear the
+ keyboard, never more than the container's own overlap, and rides the hook's
+ one transition to that value like every Core rider. The read of that bar is
+ the one exception to the hook's single layout read per keyboard change, stated
+ below. The `translate` property composes with a `transform` the app sets. The
+ module writes nothing on an ancestor whose own `translate` is not `none`, and
+ nothing else on app elements. This exception is the owner's decision of
+ 2026-11-03 (`spec:AST-099/DEC-5`): a field docked in an app's own bottom bar
+ rides the keyboard like one in a Core host. The module owns that write as an
+ INV5 resource: it removes the translate once the keyboard hides after focus
+ leaves the field, or once the field unmounts. A covered field starts its
+ keyboard behavior from its focus handler, never from an Effect that reacts to
+ focus (INV2), keeps the 10 CSS px clearance `spec:AST-099` FR9 states as the
+ module's one `offset` constant, and supplies a scroller's missing scroll range
+ as a bottom offset on the field's own element. No Core component keeps its own
+ visual-viewport listener for the keyboard. The hook publishes each keyboard
+ change as one transition: a start time, a resting value, and a curve. Every
+ Core consumer that rides the keyboard rides that transition with compositor
+ animations, a translate to the resting value, never JavaScript per frame, and
+ the hook makes at most one layout read per keyboard change. A component
+ outside Core does not ride; it commits the resting value once. Packages
+ outside Core cannot import the hook; a component there that responds to the
+ keyboard keeps one listener that measures as `spec:AST-099` FR2 defines, keeps
+ focus from panning as FR4 does, blurs as FR5 does, applies the height through
+ a functional style on its own elements, and follows INV3 and INV5. The hook
+ follows INV3 and INV5.
- **INV12 — Size changes inside a container have one module.** In
`@astryxdesign/core`, one internal module produces the size-change glide
`spec:AST-105` defines. It measures the layout before and after a reported
@@ -455,6 +482,9 @@ contracts.
component that announces its own rendered content (INV10).
- `spec:AST-099/DEC-1` — one keyboard height for every component, kept
internal and applied through functional styles (INV11).
+- `spec:AST-099/DEC-5` — every Core field that brings up the keyboard stays
+ above it with no prop, and a field docked at the bottom rides it, moving an
+ app's bottom-docked fixed container too (INV11).
- `spec:AST-105/DEC-1` — the size-change glide's public shape and behavior
(INV12).
- `spec:AST-107/DEC-2` — factories under every hook, the class and
@@ -472,18 +502,18 @@ observable-behavior predicates require review or runtime evidence. Likewise, a
focused test proves only its named behavior and mutation expectation; a green
component suite is not blanket conformance with every invariant.
-| Invariant | Evidence | Failure signal |
-| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| INV1–INV2 | Initial-render and interaction tests | Output flashes a known-wrong state, or one action is delayed or repeated through an Effect |
-| INV3, INV5 | StrictMode setup/cleanup and dependency-change tests | Duplicate callback, leaked work, stale subscription, or missing resynchronization |
-| INV1, INV4, INV6 | Ref attach/null/replacement, DOM-in-state rejection, and old-node cleanup-before-new-attach mutations | A DOM node or collection enters state, old node remains active, cleanup misses replacement, or ref mutation changes semantics silently |
-| INV7 | Real-browser geometry plus N-consumer observer-instance/subscription mutations | Geometry is invalid, observer instances grow with repeated consumers, one unsubscribe silences peers, or cleanup removes another subscriber |
-| INV8 | Owner-observable behavior across documented composition replacement; optional focused internal mechanism tests | Behavior disappears or changes owner when a documented subpart is replaced |
-| INV9 | Provider/external-store identity and render-count tests | Unchanged semantic payload changes identity, or snapshot identity creates a render loop |
-| INV10 | Shared test over every adopter of the announcement module | An adopter holding its own Effect, observer, timer, or listener for its own-content announcement |
-| INV11 | Source boundary check plus hook tests across StrictMode replay and unmount | A second keyboard listener or measurement in Core; a consumer reading a CSS custom property on the root or a shared ancestor for the height; an export of the hook; a component outside Core measuring by a rule other than AST-099 FR2, or riding the keyboard; a listener left after unmount; a Core rider driven by JavaScript per frame or by its own transition; or more than one layout read per keyboard change |
-| INV12 | Source boundary check plus real-browser tests on a throttled phone profile over a 10-level by 50-sibling tree and two changes in one frame | A per-frame height or layout, a walk past the area or into a subtree other than `display: contents`, an element moved twice for one frame, an added element other than a swap's one transient copy, that copy left after the swap ends, or an exported reporting function fails |
-| INV13 | Source boundary check plus bundle analysis of a page with several touch components, and real-browser tests on a throttled phone profile, under a fine pointer, and on a hybrid device | A second copy of a touch module on one page, a component bundling its own copy of a module's primitive, an `import()` of a module in a component other than `Item`'s released loader for its deprecated swipe props, a swipe module (the gesture core, the animator, the panels' rendering, the row's gesture code) imported by `Item` or `ListItem`, swipe code in `Item` other than its deprecated path (that loader, the released row style, the role gate, the `commit` warning, the bridge, the click guard, the event forwarders, and the coexistence diagnostic), or any of it outside the deprecated path, a public export or doc entry for the modules, an install call or installed check in the public API, a gesture listener in a component that uses no gesture, or an idle document listener outside a press other than the one shared press controller and the one stray-click swallower, an import of `@astryxdesign/core/internal/*` outside Core and Lab, a class outside the recognizer family, an `instanceof` check on a recognizer, an internal factory with a public factory's name, or a direct module import for a job the public layer covers fails |
-| INV15 | Unit tests of the animator's value mode and real-browser proofs of its adopters | A value off its motion role, a count past the component's swap size, a count or cross-fade under reduced motion with a coarse or a fine pointer, an intermediate value announced, or a public export fails |
-| INV16 | Review of each Core component that handles a concern Core owns in a shared hook or utility | A Core component that keeps its own effect, listener, or tracker for that concern fails, whether or not it also calls the hook or utility |
-| INV16 (slot presence) | `no-nullish-jsx-guard` strict lint over Core and RichText, with no baseline, and `no-truthy-jsx-guard` strict lint over Core, with no baseline; both catch inline guards only, so review also checks for a presence test hoisted into a variable, converted (`!!value`, `Boolean(value)`), made by an early return or a `??` default, or passed through a prop spread, which the lints pass; empty-slot tests that pass `''`, `false`, `true`, and `null` and compare with an omitted slot, plus `0` as content, in Item, MetadataList, ChatSystemMessage, TreeList, TopNavMegaMenu, RichTextEditor, and RichTextEditorToolbar | A slot given `''`, `true`, or `false` draws a wrapper, lane, border, or separator that an omitted slot does not, an element loses the name it has without the slot, `0` does not render, or a new bare nullish or truthiness presence test, inline or hoisted, a truthiness guard past the baseline, a baseline entry added, or a hand-written copy of the check lands |
+| Invariant | Evidence | Failure signal |
+| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| INV1–INV2 | Initial-render and interaction tests | Output flashes a known-wrong state, or one action is delayed or repeated through an Effect |
+| INV3, INV5 | StrictMode setup/cleanup and dependency-change tests | Duplicate callback, leaked work, stale subscription, or missing resynchronization |
+| INV1, INV4, INV6 | Ref attach/null/replacement, DOM-in-state rejection, and old-node cleanup-before-new-attach mutations | A DOM node or collection enters state, old node remains active, cleanup misses replacement, or ref mutation changes semantics silently |
+| INV7 | Real-browser geometry plus N-consumer observer-instance/subscription mutations | Geometry is invalid, observer instances grow with repeated consumers, one unsubscribe silences peers, or cleanup removes another subscriber |
+| INV8 | Owner-observable behavior across documented composition replacement; optional focused internal mechanism tests | Behavior disappears or changes owner when a documented subpart is replaced |
+| INV9 | Provider/external-store identity and render-count tests | Unchanged semantic payload changes identity, or snapshot identity creates a render loop |
+| INV10 | Shared test over every adopter of the announcement module | An adopter holding its own Effect, observer, timer, or listener for its own-content announcement |
+| INV11 | Source boundary check plus hook tests across StrictMode replay and unmount | A second keyboard listener or measurement in Core; a consumer reading a CSS custom property on the root or a shared ancestor for the height; an export of the hook; a component outside Core measuring by a rule other than AST-099 FR2, or riding the keyboard; a listener left after unmount; a translate left on an app element after the keyboard hides once focus has left the field, or after the field unmounts; any other write on an app element; a translate on a container whose layout box is not at the bottom edge, that fills the viewport, or whose own `translate` is not `none`; a translate on a container whose position the app is animating with CSS when the module measures; on a docked container too tall to fit above the keyboard once moved (a full-height side drawer, a pane below a fixed header), a translate when a scroller holds the field or one larger than the focused field needs to clear the keyboard; a translate measured before the page's own keyboard listeners run; a covered field deciding its keyboard behavior in an Effect that reacts to focus; a Core rider driven by JavaScript per frame or by its own transition; or more than one layout read per keyboard change beyond the docked bar's one read INV11 names |
+| INV12 | Source boundary check plus real-browser tests on a throttled phone profile over a 10-level by 50-sibling tree and two changes in one frame | A per-frame height or layout, a walk past the area or into a subtree other than `display: contents`, an element moved twice for one frame, an added element other than a swap's one transient copy, that copy left after the swap ends, or an exported reporting function fails |
+| INV13 | Source boundary check plus bundle analysis of a page with several touch components, and real-browser tests on a throttled phone profile, under a fine pointer, and on a hybrid device | A second copy of a touch module on one page, a component bundling its own copy of a module's primitive, an `import()` of a module in a component other than `Item`'s released loader for its deprecated swipe props, a swipe module (the gesture core, the animator, the panels' rendering, the row's gesture code) imported by `Item` or `ListItem`, swipe code in `Item` other than its deprecated path (that loader, the released row style, the role gate, the `commit` warning, the bridge, the click guard, the event forwarders, and the coexistence diagnostic), or any of it outside the deprecated path, a public export or doc entry for the modules, an install call or installed check in the public API, a gesture listener in a component that uses no gesture, or an idle document listener outside a press other than the one shared press controller and the one stray-click swallower, an import of `@astryxdesign/core/internal/*` outside Core and Lab, a class outside the recognizer family, an `instanceof` check on a recognizer, an internal factory with a public factory's name, or a direct module import for a job the public layer covers fails |
+| INV15 | Unit tests of the animator's value mode and real-browser proofs of its adopters | A value off its motion role, a count past the component's swap size, a count or cross-fade under reduced motion with a coarse or a fine pointer, an intermediate value announced, or a public export fails |
+| INV16 | Review of each Core component that handles a concern Core owns in a shared hook or utility | A Core component that keeps its own effect, listener, or tracker for that concern fails, whether or not it also calls the hook or utility |
+| INV16 (slot presence) | `no-nullish-jsx-guard` strict lint over Core and RichText, with no baseline, and `no-truthy-jsx-guard` strict lint over Core, with no baseline; both catch inline guards only, so review also checks for a presence test hoisted into a variable, converted (`!!value`, `Boolean(value)`), made by an early return or a `??` default, or passed through a prop spread, which the lints pass; empty-slot tests that pass `''`, `false`, `true`, and `null` and compare with an omitted slot, plus `0` as content, in Item, MetadataList, ChatSystemMessage, TreeList, TopNavMegaMenu, RichTextEditor, and RichTextEditorToolbar | A slot given `''`, `true`, or `false` draws a wrapper, lane, border, or separator that an omitted slot does not, an element loses the name it has without the slot, `0` does not render, or a new bare nullish or truthiness presence test, inline or hoisted, a truthiness guard past the baseline, a baseline entry added, or a hand-written copy of the check lands |
diff --git a/docs/families/input-fields.md b/docs/families/input-fields.md
index 59d6b73901..4caf445c1d 100644
--- a/docs/families/input-fields.md
+++ b/docs/families/input-fields.md
@@ -46,7 +46,13 @@ architecture:
architecture:public-component-api,
]
contributing: []
-deciding_specs: [spec:AST-001/DEC-1, spec:AST-001/DEC-2, spec:AST-002/DEC-1]
+deciding_specs:
+ [
+ spec:AST-001/DEC-1,
+ spec:AST-001/DEC-2,
+ spec:AST-002/DEC-1,
+ spec:AST-099/DEC-5,
+ ]
---
# Input field family contract
@@ -249,6 +255,23 @@ another implementation helper.
`component:TextInput` FR16 admits the keyboard props only on TextInput and
TextArea, where a caller sets `enterKeyHint="search"` for a search field.
+- **FR13 — A member that brings up the keyboard stays above it.** When the
+ on-screen keyboard opens, a member's focused text-entry field stays visible
+ above it when the member renders in the page's scrolling content, in a Core
+ host such as a sheet, or in an app's fixed bar docked to the viewport's bottom
+ edge with no `translate` of its own; a member in such a bar rides the keyboard
+ with it, as `spec:AST-099` FR9 defines. A member inside any other fixed
+ container, one floating above the bottom edge or one that sets its own
+ `translate`, is not moved; the app positions it. This covers TextInput,
+ TextArea, NumberInput, the typed fields of DateInput, DateTimeInput, and
+ TimeInput, the inputs of Typeahead and Tokenizer, and the search row of
+ Selector and MultiSelector. It is internal behavior with no prop or other
+ public API, as `spec:AST-099` FR9 requires; that record owns the observable
+ rule and the full list of covered fields, including those of PowerSearch,
+ CommandPalette, and ChatComposer. A member whose field brings up no keyboard,
+ such as DateRangeInput, FileInput, ComplexSelector, or a touch picker field
+ with no input mode, is outside it.
+
## Allowed component variation
- **AV1 — Native versus composed control.** Text fields may use native inputs;
@@ -388,6 +411,9 @@ DEC-6 does not require unrelated components to add a new floor.
styling passed through a product wrapper's own props or spread; FR10's type
error surfaces those callsites.
+- **On-screen keyboard (FR13):** no member meets FR13 on current main. No
+ member has keyboard handling, and the keyboard module does not exist
+ yet; `spec:AST-099` lists each gap.
- **Verification coverage:** current unit tests prove composition, semantics, and
individual state behavior, but do not yet provide the complete real-browser
inline-size/end-overlap matrix below. This current record names those
@@ -398,20 +424,21 @@ The exhaustive coverage obligation follows the membership and adoption tables.
## Verification map
-| Contract | Verification | Representative members and states | Mutation or failure expectation |
-| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| FR1 | Real-Chromium before/after inline-size measurements in block, flex-item, inline-block, grid auto-track, and explicit-width containers | TextInput baseline; Selector exception; Typeahead empty/selected/source-busy; Tokenizer zero/one/many tokens | Value or busy state changes the field's outer inline size outside a recorded exception |
-| FR2 | Real-Chromium content-box/control-box overlap matrix at narrow supported widths and LTR/RTL | clear, Spinner, status, disclosure, Tokenizer `endContent`; alone and combined | Content, caret, or pointer hit area intersects a rendered end control, or stale reserve remains after it unmounts |
-| FR3 | InputGroup unit tests plus rendered size/height, surface/focus-ownership, overflow, and interaction checks | every admitted member; Tokenizer zero/one/many tokens, focused/unfocused, explicit/default overflow; mismatched child/group sizes | A child keeps competing outer geometry, expands or adds a row, loses connected focus/border ownership, or changes naming, keyboard, focus, editing, or selection semantics |
-| FR4 | Keyboard, pointer, and accessibility-tree tests | each member that exposes `disabledMessage` | Reason becomes unreachable, or the disabled control mutates/activates |
-| FR5 | Selector and MultiSelector interaction and announcement tests from AST-001 | populated options while input-busy; explicit source-pending; completed empty | Input busy suppresses supplied options or substitutes for source state |
-| FR6 | Focused callback/order/optimistic/busy tests for every Action-capable mutation path | typing, selection, calendar/preset, file selection, and clear where exposed | Callback/Action order changes, optimistic feedback disappears, or a clear path bypasses the Action contract |
-| FR7 | Typeahead/Tokenizer source-busy tests and real-browser geometry checks | direct BaseTypeahead, standalone wrappers, grouped Typeahead, selected/tokenized values | Busy feedback is unnamed/duplicated, `aria-busy` is absent, or source loading changes row/inline geometry |
-| FR8 | Representative member tests plus real-browser overlap/opacity/height checks | eligible single-line direct controls; wrapped, custom, tall, and translucent controls; all three placements | Attached is missing where supported, appears where unsafe, or tooltip reaches direct FieldStatus |
-| FR9 | `inputFontFloor.test.ts`, focused computed-style checks, and real iOS Safari focus evidence | iOS touch, non-iOS coarse pointer, and desktop fine pointer | iOS renders below 16 CSS px or focus zooms, or a non-iOS coarse pointer receives the iOS-only floor |
-| FR10 | A type test over every Field-composed component's props that fails if one accepts root `xstyle`, `className`, or `style`; per-component render tests for every base prop, `container*`, and `control*` prop and for both development warnings | every Field-composed component standalone, in horizontal-label FormLayout, and inside InputGroup where admitted | A component type-checks with root styling, a base prop lands off the primary semantic control, `container*` lands off the Field box or on the control box, `control*` lands off the control box, or a warning is missing |
-| FR11 | `InputClearButton.test.tsx` tooltip and accessible-name assertions, plus real-Chromium hover captures | a long field label; a locale override; light and dark | The tooltip repeats the field label, or the accessible name loses the field label |
-| FR12 | `Typeahead.test.tsx`, `BaseTypeahead.test.tsx`, `Tokenizer.test.tsx`, `Selector.test.tsx`, and `MultiSelector.test.tsx` cases for both attributes, with Enter keeping its member-owned effect; `SearchKeyboard.interaction.browser.spec.ts` on a touch-emulated phone, where the search input a tap focuses carries both | Typeahead; Tokenizer; Selector and MultiSelector search row; a phone viewport with touch emulation | A missing attribute, or an Enter whose effect changes with the label, fails |
+| Contract | Verification | Representative members and states | Mutation or failure expectation |
+| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| FR1 | Real-Chromium before/after inline-size measurements in block, flex-item, inline-block, grid auto-track, and explicit-width containers | TextInput baseline; Selector exception; Typeahead empty/selected/source-busy; Tokenizer zero/one/many tokens | Value or busy state changes the field's outer inline size outside a recorded exception |
+| FR2 | Real-Chromium content-box/control-box overlap matrix at narrow supported widths and LTR/RTL | clear, Spinner, status, disclosure, Tokenizer `endContent`; alone and combined | Content, caret, or pointer hit area intersects a rendered end control, or stale reserve remains after it unmounts |
+| FR3 | InputGroup unit tests plus rendered size/height, surface/focus-ownership, overflow, and interaction checks | every admitted member; Tokenizer zero/one/many tokens, focused/unfocused, explicit/default overflow; mismatched child/group sizes | A child keeps competing outer geometry, expands or adds a row, loses connected focus/border ownership, or changes naming, keyboard, focus, editing, or selection semantics |
+| FR4 | Keyboard, pointer, and accessibility-tree tests | each member that exposes `disabledMessage` | Reason becomes unreachable, or the disabled control mutates/activates |
+| FR5 | Selector and MultiSelector interaction and announcement tests from AST-001 | populated options while input-busy; explicit source-pending; completed empty | Input busy suppresses supplied options or substitutes for source state |
+| FR6 | Focused callback/order/optimistic/busy tests for every Action-capable mutation path | typing, selection, calendar/preset, file selection, and clear where exposed | Callback/Action order changes, optimistic feedback disappears, or a clear path bypasses the Action contract |
+| FR7 | Typeahead/Tokenizer source-busy tests and real-browser geometry checks | direct BaseTypeahead, standalone wrappers, grouped Typeahead, selected/tokenized values | Busy feedback is unnamed/duplicated, `aria-busy` is absent, or source loading changes row/inline geometry |
+| FR8 | Representative member tests plus real-browser overlap/opacity/height checks | eligible single-line direct controls; wrapped, custom, tall, and translucent controls; all three placements | Attached is missing where supported, appears where unsafe, or tooltip reaches direct FieldStatus |
+| FR9 | `inputFontFloor.test.ts`, focused computed-style checks, and real iOS Safari focus evidence | iOS touch, non-iOS coarse pointer, and desktop fine pointer | iOS renders below 16 CSS px or focus zooms, or a non-iOS coarse pointer receives the iOS-only floor |
+| FR10 | A type test over every Field-composed component's props that fails if one accepts root `xstyle`, `className`, or `style`; per-component render tests for every base prop, `container*`, and `control*` prop and for both development warnings | every Field-composed component standalone, in horizontal-label FormLayout, and inside InputGroup where admitted | A component type-checks with root styling, a base prop lands off the primary semantic control, `container*` lands off the Field box or on the control box, `control*` lands off the control box, or a warning is missing |
+| FR11 | `InputClearButton.test.tsx` tooltip and accessible-name assertions, plus real-Chromium hover captures | a long field label; a locale override; light and dark | The tooltip repeats the field label, or the accessible name loses the field label |
+| FR12 | `Typeahead.test.tsx`, `BaseTypeahead.test.tsx`, `Tokenizer.test.tsx`, `Selector.test.tsx`, and `MultiSelector.test.tsx` cases for both attributes, with Enter keeping its member-owned effect; `SearchKeyboard.interaction.browser.spec.ts` on a touch-emulated phone, where the search input a tap focuses carries both | Typeahead; Tokenizer; Selector and MultiSelector search row; a phone viewport with touch emulation | A missing attribute, or an Enter whose effect changes with the label, fails |
+| FR13 | TBD (gap): the per-field keyboard focus tests and simulator evidence `spec:AST-099` FR9 names | each member FR13 covers, in the page, a sheet, a docked bar Core moves, a floating bar, and a bar with its own `translate` | A focused field left under the keyboard in a scroller (including one inside a fixed container FR9 leaves to the app), a Core host, or a docked bar Core moves, or a public prop for the behavior; a field with no scroller between it and a floating, own-`translate`, or full-viewport host is the app's to position and is not a failure |
## Decision links
diff --git a/docs/specs/AST-099-mobile-keyboard/spec.md b/docs/specs/AST-099-mobile-keyboard/spec.md
index 11360a051d..0b11347257 100644
--- a/docs/specs/AST-099-mobile-keyboard/spec.md
+++ b/docs/specs/AST-099-mobile-keyboard/spec.md
@@ -11,7 +11,7 @@ approved_at: 2026-10-24
phase: accepted
owners: [cixzhang]
affects_architecture: [architecture:react-component-runtime]
-affects_families: []
+affects_families: [family:input-fields]
affects_contributing: []
affects_consumer_docs:
[
@@ -26,7 +26,25 @@ affects_consumer_docs:
```json
{
- "paths": ["packages/core/src/BottomSheet/**"]
+ "paths": [
+ "packages/core/src/BottomSheet/**",
+ "packages/core/src/TextInput/**",
+ "packages/core/src/TextArea/**",
+ "packages/core/src/NumberInput/**",
+ "packages/core/src/DateInput/**",
+ "packages/core/src/DateTimeInput/**",
+ "packages/core/src/TimeInput/**",
+ "packages/core/src/Typeahead/**",
+ "packages/core/src/Tokenizer/**",
+ "packages/core/src/Field/PanelSearchInput.tsx",
+ "packages/core/src/Selector/**",
+ "packages/core/src/MultiSelector/**",
+ "packages/core/src/PowerSearch/**",
+ "packages/core/src/CommandPalette/**",
+ "packages/core/src/Chat/ChatComposer.tsx",
+ "packages/core/src/Chat/ChatComposerInput.tsx",
+ "packages/core/src/Chat/ChatLayout.tsx"
+ ]
}
```
@@ -38,7 +56,10 @@ A person typing on a phone sees the field they are typing in, and the surface
around it, above the on-screen keyboard, and the page does not lurch when a
field takes focus. Every surface that responds to the keyboard measures it the
same way and keeps the page still, so the keyboard behaves the same in a sheet,
-a chat composer, or a search field.
+a chat composer, or a search field. Core inputs work with the keyboard: every
+Core field that brings up the keyboard keeps itself above it in the page, in a
+Core host, and in an app's bar docked to the bottom edge, with nothing for the
+app to turn on.
## Non-goals
@@ -71,19 +92,20 @@ a chat composer, or a search field.
including while the page is pinch-zoomed. A page pan or a visual-viewport
offset is a pan to put back (FR4), never a smaller keyboard.
- **FR3 — The keyboard height stays internal and keeps layout correct.** No
- public CSS custom property, export, or prop exposes the keyboard height.
- Each component applies it on its own element, such as a bottom offset, a
- padding, or a maximum height, so layout is correct with no animation running:
- the chat composer, a search field placed at the bottom, and tab bar search
- position from it, and a fully expanded sheet extends its own scroll range by
- it. How the value reaches styles is
- `architecture:react-component-runtime` INV11. Riding the keyboard's motion
- layers on top of that layout, so layout never depends on it; FR8 requires it
- where it applies. When surfaces ride it, such as
- a composer, a scroll view, and a header, they all move in sync along the same
- motion to the resting value with no per-frame layout work, and each commits
- the resting value once to layout, as an offset, a padding, or a spacer, so
- nothing is hidden or unscrollable. How the motion is shared is
+ public CSS custom property, export, or prop exposes the keyboard height. Each
+ component applies it on its own element, such as a bottom offset, a padding,
+ or a maximum height, so layout is correct with no animation running: the chat
+ composer, a search field placed at the bottom, and tab bar search position
+ from it, and a fully expanded sheet extends its own scroll range by it. FR9's
+ docked ride is the one exception: Core moves an app's bottom-docked container
+ by the distance from the bar's drawn bottom to the keyboard's top (FR9). How
+ the value reaches styles is `architecture:react-component-runtime` INV11.
+ Riding the keyboard's motion layers on top of that layout, so layout never
+ depends on it; FR8 requires it where it applies. When surfaces ride it, such
+ as a composer, a scroll view, and a header, they all move in sync along the
+ same motion to the resting value with no per-frame layout work, and each
+ commits the resting value once to layout, as an offset, a padding, or a
+ spacer, so nothing is hidden or unscrollable. How the motion is shared is
`architecture:react-component-runtime` INV11; no public API or CSS custom
property exposes it.
- **FR4 — Focus never pans the page.** Every route into a text-entry control
@@ -133,6 +155,83 @@ a chat composer, or a search field.
An Android browser without a keyboard geometry API
that shrinks only its visual viewport, such as Firefox for Android, gets
FR2–FR5 under FR6.
+- **FR9 — Every Core field that brings up the keyboard stays above it.** When
+ the on-screen keyboard opens, a focused Core text-entry field stays visible
+ above it, with nothing for the app to do, when it renders in the page's
+ scrolling content, in a Core host such as a sheet or the chat composer's dock,
+ or in an app's fixed bar docked to the viewport's bottom edge that sets no
+ `translate` of its own. A field in scrolling content or in a Core host sits 10
+ CSS px clear of the keyboard's top edge, the clearance `spec:AST-059` FR9
+ keeps under a layer; a field in an app's docked bar rides with the bar, whose
+ bottom meets the keyboard's top edge. Core does not move any other fixed
+ container (one floating above the bottom edge, one that sets its own
+ `translate`, or a full-viewport one); the app positions it. The keyboard's top
+ is FR2's height. The page is never panned or translated for a field Core
+ reveals or moves. Inside a fixed container FR9 leaves to the app, a field with
+ a scroller between it and that container follows the scrolling-content rule:
+ its nearest scroller reveals it and the page is not panned. Only a field with
+ no scroller between it and that container keeps the browser's own focus
+ reveal, which in Safari may pan the page.
+ - **Scrolling content.** A field in scrolling content is scrolled into place
+ by its nearest scroller, the document included, in the same frame the
+ keyboard's size is reported. When that scroller cannot scroll far enough, it
+ gains the missing scroll range at its end while the keyboard shows and loses
+ it when the keyboard hides. Nothing else moves.
+ - **Docked containers.** A field docked at the bottom of the viewport, in a
+ bottom bar, a fixed toolbar, or a sheet, rides the keyboard: its docked
+ container moves up as the keyboard opens and back down as it closes, on
+ FR8's ride (DEC-2) where that applies, and following the visual-viewport
+ height (FR2) elsewhere, such as Safari on iOS. A Core host rides by applying
+ the keyboard height on its own element (FR3), and the field inside it is not
+ moved a second time.
+ - **App-owned docked containers.** A container the app owns rides too when it
+ is fixed-position, does not fill the viewport, and is docked: its layout
+ box, before any transform, sits at the viewport's bottom edge. A docked
+ container whose drawn box, once moved, would not fit in the room above the
+ keyboard, such as a full-height side drawer or a pane below a fixed header,
+ is handled by the field: if a scroller holds the field, the field is
+ revealed through it and the container does not move; if no scroller holds
+ it, the container moves only as far as the focused field needs to clear the
+ keyboard, never more than the container's own overlap, so the field stays in
+ view even if the container's top leaves the screen. A docked container that
+ fits moves up by the distance from its bottom edge as drawn, after any lift
+ the app applies itself, to the keyboard's top edge, measured after each
+ keyboard report, including a keyboard that changes height while focus stays
+ in the bar, and each focus move, once the page's own listeners have run. So
+ a bar the app already lifts to the keyboard is not lifted again, a bar the
+ app lifts part of the way moves the rest, and a bar that stays put moves by
+ the full overlap. Core leaves a bar the app is moving with a CSS transition
+ or animation (one running on its position when Core measures), so that bar
+ is never lifted twice. Core cannot see a bar the app moves from script each
+ frame; an app that lifts its bar from script positions it with its own
+ `translate`, which Core never moves, to keep it clear. The move adds to any
+ transform the app sets. A bar whose own computed `translate`, the value the
+ app sets and not Core's move, is not `none`, such as one centred with
+ `translate: -50% 0`, is not moved. The bar's resting state is that move, not
+ a change to its layout, and the move is gone once the keyboard hides after
+ the field loses focus, or once the field unmounts. Core changes nothing else
+ on the app's elements. This is the one exception to FR3 (DEC-5).
+ - **No API.** No prop, option, context, or other public API turns this on,
+ turns it off, or tunes it, and for a field in the places above the app does
+ nothing to get it. Every route by which a field gains focus (FR4) gets the
+ same behavior.
+ - **Covered fields:**
+ - TextInput, TextArea, and NumberInput;
+ - the typed fields of DateInput, DateTimeInput, and TimeInput, in every
+ presentation that renders one;
+ - the inputs of Typeahead and Tokenizer, which BaseTypeahead renders, and
+ Tokenizer's sheet search field;
+ - the search row of Selector and MultiSelector;
+ - PowerSearch's query input, the text and number fields of its value
+ editor, and the search and value fields of its sheet flow;
+ - CommandPalette's search input;
+ - ChatComposer's input.
+
+ A Core field added later that brings up the keyboard is covered by the same
+ rule. A field that brings up no keyboard is outside it: a read-only touch
+ picker field with no input mode, a native date or time picker, DateRangeInput's
+ trigger, FileInput, Slider, and a Selector or ComplexSelector trigger. Lab
+ fields follow INV11's rule for components outside Core.
### Platform support
@@ -164,8 +263,35 @@ a chat composer, or a search field.
`architecture:react-component-runtime` INV11 names: FR6 replaces the
user-agent check, FR3 keeps the height internal, and BottomSheet consumes the
shared source (`component:BottomSheet`).
-- No other component on `main` measures the keyboard. A component that later
+- No other component on `main` measures the keyboard; BaseTypeahead reads the
+ visual-viewport height only to size its list (Gap 4). A component that later
responds to the keyboard uses the same height (FR1).
+- Every field FR9 covers gains keyboard behavior it lacks on `main` (Gaps
+ 2–11); the input family cites FR9 (`family:input-fields` FR13).
+- Apps with their own fixed bottom bar: a bar that stays put while the keyboard
+ opens rides it under FR9. A bar the app already moves with the keyboard
+ behaves as before in two cases: a bar the app is moving with a CSS transition
+ or animation that is running when Core measures, which Core leaves to the app,
+ and a bar the app moves from script with its own `translate`, which Core never
+ moves. A bar the app has already lifted is measured as drawn, so Core moves it
+ by nothing; a bar the app lifts only part of the way, with no CSS motion
+ running, moves the rest, on top of the app's own transform. A CSS lift the app
+ starts after Core has measured can be lifted twice, and so can a lift the app
+ drives from script each frame on `transform`, which Core cannot see. No
+ opt-out API is needed.
+- Bars that position with `translate`, and fixed containers that float above the
+ bottom edge, do not ride: Core leaves them where the app puts them. A field in
+ one that a scroller holds is still revealed by that scroller; a field with no
+ scroller between it and the container can stay under the keyboard. An app that
+ wants the ride docks the bar to the bottom edge and positions it with
+ `transform` or with no `translate` (Follow-up). A docked container too tall to
+ fit above the keyboard, such as a full-height side drawer or a pane below a
+ fixed header, does not move when a scroller holds the field, and otherwise
+ moves only as far as the focused field needs.
+- `architecture:react-component-runtime` INV11 admits FR9's docked ride: Core
+ writes, and removes, a `translate` on an app's docked fixed container whose
+ own `translate` is `none`, equal to the distance from its drawn bottom to the
+ keyboard's top, and nothing else on app elements (DEC-5).
- Layer caps do not account for the keyboard: `spec:AST-059` owns layer
geometry, and keeping Popover and other anchor-mode layers above the keyboard
is an amendment to that record that consumes this height.
@@ -180,21 +306,85 @@ a chat composer, or a search field.
- No public API exposes the keyboard height, and FR3 keeps it that way.
- The consumer documentation gains the Android viewport setting (FR8).
+### Implementation gaps
+
+No covered field meets FR9 on `main`. Each gap below is open.
+
+- **Gap 1 — The keyboard module.** `packages/core/src/keyboard/` does not
+ exist. The only keyboard handling is BottomSheet's internal hook, which acts
+ only in a fully expanded Tall sheet and gates its focus claim on an iOS user
+ agent.
+- **Gap 2 — TextInput, TextArea, and NumberInput.** None has keyboard focus
+ handling. In the page, only the browser's own reveal scroll brings the field
+ into view, and nothing proves it stays above the keyboard.
+- **Gap 3 — The typed fields of DateInput, DateTimeInput, and TimeInput.** No
+ keyboard handling. Their touch picker fields are read-only with no
+ input mode and bring up no keyboard, so they are outside FR9.
+- **Gap 4 — The inputs of Typeahead and Tokenizer.** BaseTypeahead's input has
+ no keyboard handling. BaseTypeahead reads the visual viewport height
+ itself to size its list, outside the keyboard module.
+- **Gap 5 — Tokenizer's sheet search field.** Partly met: the field sits in a
+ Tall sheet, so BottomSheet's hook covers it only when the sheet is fully
+ expanded and only on an iOS user agent. Chrome and Firefox on Android, and a
+ partly expanded sheet, get nothing.
+- **Gap 6 — The search row of Selector and MultiSelector.** On a coarse
+ pointer the row sits in a `hug` BottomSheet, which BottomSheet's hook does
+ not cover, and it has no keyboard handling of its own.
+- **Gap 7 — PowerSearch.** On a compact coarse-pointer screen its default
+ presentation is its sheet flow (`component:PowerSearch` DEC-3): Tall bottom
+ sheets, where BottomSheet's hook partly covers the search and value fields, as
+ Gap 5 states for Tokenizer. Its query input (Gap 4) and the text and number
+ fields of its popover value editor render there only with
+ `presentation="popover"`, and everywhere else by default; they have no
+ keyboard handling. Keeping the popover itself above the keyboard is
+ `spec:AST-059`'s.
+- **Gap 8 — CommandPalette's search input.** It sits in a Dialog and has no
+ keyboard handling.
+- **Gap 9 — ChatComposer's input.** ChatLayout docks the composer with a fixed
+ or sticky position at the bottom of the page, and neither the dock nor the
+ input applies the keyboard height, so on iOS the composer stays under the
+ keyboard. FR9 requires the dock to apply the height on its own element and
+ ride (Gap 11).
+- **Gap 10 — Fields in a fixed host the app builds.** A covered field in the
+ app's own fixed or sticky bottom bar, in a fixed Toolbar, or in a BottomSheet
+ that is not a fully expanded Tall sheet, has no handling that keeps it above
+ the keyboard.
+- **Gap 11 — The docked ride and the page-content reveal.** No covered field
+ rides the keyboard on `main`. The keyboard module that would carry the ride
+ does not exist (Gap 1), nothing moves an app's docked fixed container to the
+ keyboard's top, no field scrolls its nearest scroller to put itself 10 CSS px
+ above the keyboard in the frame the keyboard is reported, no field adds the
+ missing scroll range at its scroller's end, and ChatLayout's dock does not
+ apply the keyboard height. BottomSheet's inset stays local to its own sheet.
+ The missing scroll range is not added yet; until it is, an element that has
+ nothing to scroll does not count as a scroller (the field keeps the browser's
+ own reveal).
+
+### Follow-up
+
+Riding floating bars and composing with an app's own `translate` are open work
+beyond FR9. FR9 leaves a fixed container that floats above the bottom edge, or
+that sets its own `translate`, to the app.
+
## Verification
-| Contract | Verification | Representative states | Mutation or failure expectation |
-| ------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| FR1 | Source boundary check over Core and Lab plus a shared test that drives one keyboard change | each listed consumer; a new keyboard-aware component | Two components reading different heights for one keyboard, or a component measuring by a rule other than FR2 |
-| FR2 | Module tests driving visual-viewport resize and scroll events | keyboard shown; hidden; page panned with the keyboard shown; offset without a keyboard; page pinch-zoomed with and without the keyboard | A pan that lowers the reported height, or a height when no keyboard is shown |
-| FR3 | Consumer tests of computed layout, plus a public-surface check | keyboard shown and hidden; composer, bottom search field, tab bar search, Tall sheet; no animation running; a ride animation running with the composer, a scroll view, and a header together | A consumer whose layout ignores the height, layout that is only correct after an animation, riding surfaces out of sync on one keyboard change, per-frame layout work during a ride, content hidden or unscrollable at the resting value, or a public CSS custom property, export, or prop for the height |
-| FR4 | Focus-route tests with document scroll spies | tap, previous and next buttons, Tab, programmatic focus, Done then tap, app resume while scroll-locked | A route that scrolls the document, or a slipped scroll left in place |
-| FR5 | Surface move tests | sheet drag between heights, drag to dismiss, close, with a focused field | The field stays focused after a move starts, or content jumps on the first frame |
-| FR6 | Capability tests with the user agent varied | visual viewport shrinking with a fixed layout viewport; Chrome on Android reporting keyboard geometry; a desktop browser with the API and no on-screen keyboard; a page that is not a secure context; neither | Behavior that changes with the user agent alone, or a height taken from the browser's keyboard geometry report instead of FR2's measurement |
-| FR7 | Tests in an iframe and in a top-level document | the same keyboard event sequence in both | A non-zero value or a claimed focus inside an iframe |
-| FR8 | Chrome on Android in the emulator with Gboard, top-level document, plus a consumer documentation check | keyboard show and hide with the composer and a Tall sheet; a Lab bottom search field; reduced motion on; focus inside a keyboard-aware field, which rides by the visual-viewport height; an app with `interactive-widget=resizes-content`, focus inside and outside keyboard-aware fields, where a field's keyboard height is 0 | A Core surface jumping after the keyboard settles, lagging the keyboard by more than a frame, left under the keyboard, moved by JavaScript per frame, or committing layout more than once; a Lab surface riding instead of committing at rest; anything travelling with the keyboard under reduced motion instead of DR2's cross-fade; the app's viewport setting overridden; a keyboard-aware field not riding by the visual-viewport height, or adding an offset under `interactive-widget=resizes-content`; or the setting missing from the docs |
-| FR8 | Firefox for Android, emulator or device, top-level document | focus routes, keyboard shown and hidden, page panned and pinch-zoomed, a sheet moved | The page lurches, the field ends under the keyboard, or the height is wrong after a pan or zoom |
-| FR2–FR5 | Safari on iOS in the iOS Simulator or on a device, top-level document | focus routes, keyboard shown and hidden, page panned and pinch-zoomed, a sheet moved, in Safari and as a home-screen app | The page lurches, the field ends under the keyboard, or the height is wrong after a pan or zoom |
-| FR2–FR5, FR8 | Release gate: physical devices in a top-level document (DEC-3) | iPhone Safari with the toolbar expanded and collapsed; iPhone home-screen app; Firefox for Android (FR2–FR5); Android Chrome with Gboard and Samsung Keyboard at the phone's refresh rate | The page lurches, the field ends under the keyboard, or the surface does not follow the keyboard |
+| Contract | Verification | Representative states | Mutation or failure expectation |
+| ------------ | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| FR1 | Source boundary check over Core and Lab plus a shared test that drives one keyboard change | each listed consumer; a new keyboard-aware component | Two components reading different heights for one keyboard, or a component measuring by a rule other than FR2 |
+| FR2 | Module tests driving visual-viewport resize and scroll events | keyboard shown; hidden; page panned with the keyboard shown; offset without a keyboard; page pinch-zoomed with and without the keyboard | A pan that lowers the reported height, or a height when no keyboard is shown |
+| FR3 | Consumer tests of computed layout, plus a public-surface check | keyboard shown and hidden; composer, bottom search field, tab bar search, Tall sheet; no animation running; a ride animation running with the composer, a scroll view, and a header together | A consumer whose layout ignores the height, layout that is only correct after an animation, riding surfaces out of sync on one keyboard change, per-frame layout work during a ride, content hidden or unscrollable at the resting value, or a public CSS custom property, export, or prop for the height |
+| FR4 | Focus-route tests with document scroll spies | tap, previous and next buttons, Tab, programmatic focus, Done then tap, app resume while scroll-locked | A route where the browser scrolls the document to reveal the focused control, or a slipped scroll left in place; FR9's own reveal scroll by the field's nearest scroller is not a failure |
+| FR5 | Surface move tests | sheet drag between heights, drag to dismiss, close, with a focused field | The field stays focused after a move starts, or content jumps on the first frame |
+| FR6 | Capability tests with the user agent varied | visual viewport shrinking with a fixed layout viewport; Chrome on Android reporting keyboard geometry; a desktop browser with the API and no on-screen keyboard; a page that is not a secure context; neither | Behavior that changes with the user agent alone, or a height taken from the browser's keyboard geometry report instead of FR2's measurement |
+| FR7 | Tests in an iframe and in a top-level document | the same keyboard event sequence in both | A non-zero value or a claimed focus inside an iframe |
+| FR8 | Chrome on Android in the emulator with Gboard, top-level document, plus a consumer documentation check | keyboard show and hide with the composer and a Tall sheet; a Lab bottom search field; reduced motion on; focus inside a keyboard-aware field, which rides by the visual-viewport height; an app with `interactive-widget=resizes-content`, focus inside and outside keyboard-aware fields, where a field's keyboard height is 0 | A Core surface jumping after the keyboard settles, lagging the keyboard by more than a frame, left under the keyboard, moved by JavaScript per frame, or committing layout more than once; a Lab surface riding instead of committing at rest; anything travelling with the keyboard under reduced motion instead of DR2's cross-fade; the app's viewport setting overridden; a keyboard-aware field not riding by the visual-viewport height, or adding an offset under `interactive-widget=resizes-content`; or the setting missing from the docs |
+| FR8 | Firefox for Android, emulator or device, top-level document | focus routes, keyboard shown and hidden, page panned and pinch-zoomed, a sheet moved | The page lurches, the field ends under the keyboard, or the height is wrong after a pan or zoom |
+| FR2–FR5 | Safari on iOS in the iOS Simulator or on a device, top-level document | focus routes, keyboard shown and hidden, page panned and pinch-zoomed, a sheet moved, in Safari and as a home-screen app | The page lurches, the field ends under the keyboard, or the height is wrong after a pan or zoom |
+| FR2–FR5, FR8 | Release gate: physical devices in a top-level document (DEC-3) | iPhone Safari with the toolbar expanded and collapsed; iPhone home-screen app; Firefox for Android (FR2–FR5); Android Chrome with Gboard and Samsung Keyboard at the phone's refresh rate | The page lurches, the field ends under the keyboard, or the surface does not follow the keyboard |
+| FR9 | TBD (Gap 1–11): a focus test per covered field, driving one keyboard change | each covered field in the page, a Tall and a `hug` BottomSheet, ChatLayout's fixed and sticky dock, an app's fixed bar docked to the bottom edge with no `translate` of its own, and a fixed Toolbar docked there; focus by tap, Tab, and `focus()`; a field in scrolling content in the page and in a nested scroller; a field near its scroller's end; a field in a scroller inside a full-viewport fixed container | A focused page field or Core-host field left under the keyboard or less than 10 CSS px above it (a field with no scroller between it and a fixed container FR9 leaves to the app keeps the browser's own reveal and is not a failure; a field that a scroller holds inside such a container, left under the keyboard, is a failure), a field in an app's docked bar whose bar's bottom does not meet the keyboard's top, scroll range left at the scroller's end after the keyboard hides, a page pan or translate, a reveal later than the frame the keyboard is reported in, or a second offset inside a host that already applies the height |
+| FR9 | TBD (Gap 1): a source boundary check over the covered fields | every covered field's props type and source | A public prop, option, or context for the behavior |
+| FR9 | TBD (Gap 1–11): Safari on iOS in the iOS Simulator and Chrome on Android in the emulator, top-level document | TextInput in the page, ChatComposer in its dock, a Selector search row in its sheet, and a TextInput in a fixed Toolbar | The field ends under the keyboard, or the page lurches |
+| FR9 | TBD (Gap 11): a ride test per covered field, plus physical-device evidence under DEC-3 | each covered field in a fixed bottom bar, a sheet, an app-owned bar whose layout box sits at the viewport's bottom edge; an app bar the app lifts to the keyboard's top on the same visual-viewport resize, with its listener running before and after Core's; an app bar the app lifts part of the way with its own transform; an app bar the app lifts behind a CSS transition or animation still running when Core measures; an app bar the app lifts from script with its own `translate`; a keyboard that changes height while focus stays in a docked bar; an app bar centred with its own `translate`; an app bar floating above the bottom edge; an app-owned fixed container that fills the viewport, with and without a scroller holding the field; a full-height side drawer with a scroller holding the field; a tall pane below a fixed header with no scroller and a field near its top; the same pane with a field near its bottom; keyboard show and hide; the field blurs; the field unmounts; reduced motion on | The docked container stays put, lags or jumps after the keyboard settles, a Core host or content field less than 10 CSS px above the keyboard, an app bar left under the keyboard or above its top edge once the keyboard settles, a move left on an app element after the keyboard hides once focus has left the field, or after the field unmounts, any other change on an app element, a bar the app lifts moved a second time, a bar the app is moving with CSS motion moved by Core, a bar with its own `translate` moved, a docked bar not updated when the keyboard changes height, a floating bar moved, the app's transform replaced, a bar with its own `translate` moved or its `translate` changed, the page is panned or translated, a fixed container that fills the viewport, or whose layout box is not at the bottom edge, moves, or a Core host that already rides is moved twice; a too-tall docked container moved when a scroller holds the field or when the field already clears the keyboard, moved more than the field needs to clear it, or a field near its bottom left under the keyboard; a field that a scroller holds inside a container FR9 leaves to the app, left under the keyboard. A container FR9 leaves to the app (floating above the bottom edge, with its own `translate`, or full-viewport) left under the keyboard, or a page pan from the browser's own reveal for a field with no scroller between it and that container, is not a failure |
## Decision log
@@ -261,6 +451,54 @@ measurement in every browser also keeps FR1's single height.
Rejected: the browser's keyboard geometry report as the height, which arrives later and less steadily and shifts the layout.
+### DEC-5 — Core inputs work with the keyboard, with no prop, and docked fields ride it
+
+**Reference:** `spec:AST-099/DEC-5`
+**Decider:** `cixzhang`, `2026-11-03`
+
+Core inputs work with the on-screen keyboard. On a touch device, keeping a
+focused field above the keyboard is the expected default for every Core field
+that brings up the keyboard, not an add-on. The behavior is internal to each
+such field, so no app has to remember to turn it on and no public API grows for
+it.
+
+Riding the keyboard is possible for every Core field, also decided on
+2026-11-03: a field docked at the bottom of the viewport moves its docked
+container up and back with the keyboard, even when the app owns that container,
+because a docked bar that jumps or hides under the keyboard feels broken. This
+is the one exception to FR3's rule that a component moves only its own elements,
+and `architecture:react-component-runtime` INV11 admits it.
+
+The owner set the scope on 2026-11-03. An app-owned container moves only when it
+is fixed and docked to the viewport's bottom edge; a fixed container that fills
+the viewport never moves. Page content Core reveals or moves is never panned or
+translated; inside a fixed container FR9 leaves to the app (one floating above
+the bottom edge, one that sets its own `translate`, or a full-viewport one), a
+field that a scroller holds is revealed by that scroller, and only a field with
+no scroller between it and the container keeps the browser's own focus reveal,
+which in Safari may pan the page. A field in scrolling content is scrolled into
+place by its nearest scroller, the document included, 10 CSS px above the
+keyboard, in the same frame the keyboard is reported. A field near its
+scroller's end gets the missing room as scroll range at the scroller's end while
+the keyboard shows. Only a docked container is translated. A container is docked
+when its layout box, before any transform, sits at the viewport's bottom edge,
+and it moves by the distance from its bottom as drawn, after the app's own lift,
+to the keyboard's top, so a bar the app already lifts is not lifted twice and no
+opt-out is needed. Core leaves a bar the app is moving with a CSS transition or
+animation that is running when Core measures, and never moves a bar with its own
+`translate`; a CSS lift the app starts after Core has measured can be lifted
+twice, and an app that lifts its bar from script positions it with its own
+`translate` to keep it clear. A bar that floats above the bottom edge, or
+positions itself with its own `translate`, is left to the app. A docked
+container too tall to fit above the keyboard once moved, such as a full-height
+side drawer or a pane below a fixed header, does not move when a scroller holds
+the field, which that scroller reveals; when no scroller holds it, the container
+moves only as far as the focused field needs to clear the keyboard, never more
+than its own overlap, so the field stays in view even if the container's top
+leaves the screen.
+
+Rejected: an opt-in prop or per-component keyboard handling; leaving an app's docked bar to the browser's reveal.
+
## Open questions
None.