Skip to content

Observe keyboard focus after editable-control taps in the shared iOS driver #475

Closed

Description

@chrisbbreuer

HQ real sandbox checkout in https://reviewos.org/stacks/hq.training/run/3034 (job8230, source f83b32d2e769cf087798c38d82f8a0776d222125, public Craft451) reached Stripe’s system browser and selected its actual native TextField labelled Card number. XCTest records a physical tap at 110.08s, then type immediately invokes application typing at 110.55s; no descendant owns keyboard focus, so XCTest fails. The original506,228-byte log is retained and its normal authenticated download matches the stored SHA-256 d0c6c9621abc1d9574aba118ef4a20f508485da5b359f9644e8754658e31b65c.

The shared driver already waits for focus for typeid/field. Generic tap→type does not observe focus when its target is an editable control. Reproduce the transition using a real native/embedded browser fixture, improve the shared driver’s focus observation without adding app-specific coordinates/sleeps, retain one-gesture evidence and negative assertions, then qualify the normal released consumer. Do not hide dropped gestures with repeated taps.

Related https://github.com/stacksjs/hq.training/issues/318 and #469 . A later checkout pass must remain distinct from explaining this original failure.

Activity

  1. chrisbbreuer commented on Nov 4, 2026

    @chrisbbreuer
    ContributorAuthor

    The source correction is pushed to main: 867303d . A tap resolves the editable target before activation (menu items can disappear immediately), and a following type observes that exact target taking keyboard focus. It does not repeat the gesture. Context-changing commands clear that pending target. Read-only text views can still be tapped without requiring a keyboard.

    Real local iOS26.5 / iPhoneSE3 comparison under the existing24GiB/load-per-core<=1.5 admission guards:

    • The unchanged published451 driver reproduces the new focus case’s exact “Neither element nor any descendant has keyboard focus” failure. It also fails a newer Boolean-control negative assertion; that separate difference is not attributed to the focus correction.
    • The final three-case fixture completes with zero unexpected failures and zero skips: one positive case and two expected-failure cases, covering delayed native focus, real WebKit typing, refused focus, unresponsive controls, Unicode Select All/replacement/deletion and normal switch changes. XCTest records exactly one physical tap each for delayed-field, Card number and refused-field.
    • The first candidate’s Select All snapshot regression was caught and corrected before release; original failed build/run evidence remains retained. Native assertions now live in an unchanged Swift fixture file. Bun1.4.4’s confirmed tagged-template raw Unicode behavior is already tracked in Preserve non-ASCII in regex .source and tagged template .raw oven-sh/bun#33866 ; no runtime/dependency patch was applied.
    • The integration rebase preserved all four driver/fixture files, generator/result helper and extracted native-control bodies byte-for-byte against the qualified local content. Disposable simulators were removed; foreign devices and original evidence were preserved.

    Integrated source checks:851 SDK passes/10 conditional skips,410 iOS package passes,242 Android package passes, types clean,43 package-export checks,Pickier0errors/28existingwarnings,pinned Zig formatting, and full Zig227/227steps with6948passes/38skips.

    Normal bun run release:patch tagged456 from92627bdbb199e73ef5c2cc53a5e98cbd835793c4. Publication remains gated on exact-source https://github.com/craft-native/craft/actions/runs/41839652768 , full native https://github.com/craft-native/craft/actions/runs/41839652644 and releaser https://github.com/craft-native/craft/actions/runs/41839652623 . HQ will consume the normally published package and repeat real Stripe/native acceptance. The controlled delayed-focus fixture does not establish the exact historical cause of the original Stripe tap; that final consumer check remains required.

  2. glennmichael123 commented on Nov 5, 2026

    @glennmichael123
    Contributor

    Fixed in 0c959bab. The shared driver observes keyboard focus through focus(_:seconds:) (DriverTests.swift.template:273), which short-circuits on hasKeyboardFocus rather than retapping — retapping a focused field can collapse its selection — and waits for the complete value without repeating input.

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