Skip to content

VerificationCodeInputField: iPad Return key clears/hides OTP fields #1407

Open

Description

@amansingh1207

Environment:

  • Swift, iPadOS version: all, FirebaseUI version: do not know exactly (Podfile.lock), Xcode: found it while testing

Steps:

  1. Present view using VerificationCodeInputField (e.g. PhoneReauthView)
  2. Focus OTP field on iPad with hardware keyboard
  3. Press Return repeatedly

Observed: fields disappear one-by-one, unrecoverable without back+Verify
Expected: Return resigns/dismisses or no-ops, fields stay visible

Relevant: FirebaseSwiftUI/FirebaseAuthUIComponents/Sources/Components/VerificationCodeInputField.swift - BackspaceAwareTextField.Coordinator has no textFieldShouldReturn, shouldChangeCharactersIn only blocks non-digits but Return path can hit handleBackspace/clear.

Activity

  1. demolaf commented on Oct 19, 2026

    @demolaf
    Member

    Hi @amansingh1207 , thanks for raising this. I see you've created a PR to fix this issue, I'll review that and keep this issue updated.

  2. self-assigned this
    on Oct 19, 2026
  3. amansingh1207 commented on Oct 20, 2026

    @amansingh1207
    Author

    Thanks @demolaf for taking a look!

    The PR #1408 fixes VerificationCodeInputField so iPad hardware Return just resigns focus (textFieldShouldReturn → resignFirstResponder + return false) instead of mutating/clearing digit fields. I also removed the newline guard so pasting codes with trailing \n (from SMS/email) still works — the existing digitsOnly filter already blocks lone Return presses.

    Happy to add a UI test for this in a follow-up PR.
    Looking forward to your feedback!

  4. demolaf commented on Oct 20, 2026

    @demolaf
    Member

    Hi @amansingh1207, I couldn't reproduce this on main (iPad simulator, hardware keyboard, sign-in and PhoneReauthView): Return only reaches textFieldShouldReturn and never clears the fields.
    Can you still reproduce it consistently? If so, please share your FirebaseUI and iPadOS versions, keyboard setup, and a short screen recording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions