Skip to content

test: lock in sequential focus with an auto-focus-on-load field (PT-21)#172

Merged
pbertsch merged 1 commit into
mainfrom
fix/pt21-autofocus
Jul 5, 2026
Merged

test: lock in sequential focus with an auto-focus-on-load field (PT-21)#172
pbertsch merged 1 commit into
mainfrom
fix/pt21-autofocus

Conversation

@pbertsch

@pbertsch pbertsch commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

A report reopened PT-21, claiming sequential tap+type across fields breaks specifically when one field requests focus during initState (e.g. a "remember last email" convenience feature) -- text supposedly keeps landing in the auto-focused field regardless of which field is tapped afterward.

Re-investigated with the exact discriminator described: a widget test with one field auto-focusing via a post-frame requestFocus(), plus real-device verification against the actual login screen with the same pattern temporarily added (both tap orders, iOS simulator, using real screenshots for visual confirmation).

Both pass cleanly -- focus correctly shifts to whichever field is tapped, each field retains only its own typed value. Adding a regression test to lock this in, matching the PT-11 precedent for reported-but-non-reproducing behavior.

Test plan

  • go build ./..., go vet ./..., go test ./... all pass
  • staticcheck ./... clean
  • dart analyze lib/ clean, flutter test all pass (33 tests, including the new one)
  • Real-device verification on iOS: temporarily added the exact auto-focus pattern to the e2e-test-workspace login screen, confirmed via screenshot both tap orders land text correctly with no cross-contamination, then reverted the temporary app change

A report reopened PT-21, claiming sequential tap+type across fields
breaks specifically when one field requests focus during initState
(e.g. a "remember last email" convenience feature) - text supposedly
keeps landing in the auto-focused field regardless of which field is
tapped afterward.

Re-investigated with the exact discriminator described: a widget test
with one field auto-focusing via a post-frame requestFocus(), plus
real-device verification against the actual login screen with the
same pattern temporarily added (both tap orders, iOS simulator).

Both pass cleanly - focus correctly shifts to whichever field is
tapped, each field retains only its own typed value. Adding a
regression test to lock this in, matching the PT-11 precedent for
reported-but-non-reproducing behavior.
@pbertsch pbertsch requested a review from a team as a code owner July 5, 2026 23:28
@pbertsch pbertsch added this pull request to the merge queue Jul 5, 2026
Merged via the queue into main with commit 883a556 Jul 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant