You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swift, iPadOS version: all, FirebaseUI version: do not know exactly (Podfile.lock), Xcode: found it while testing
Steps:
Present view using VerificationCodeInputField (e.g. PhoneReauthView)
Focus OTP field on iPad with hardware keyboard
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.
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!
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.
The UI test failure (testSignInDisplaysSignedInView in FirebaseSwiftUIExampleUITests) is unrelated to this PR — my change only touches VerificationCodeInputField.swift (added textFieldShouldReturn + returnKeyType = .done), which is used in phone OTP flows, not the sign-in/sign-out path in that test.
Looks like a flaky/pre-existing e2e issue (likely emulator/auth-timing related). Could we re-run the UI workflow? If it keeps failing, happy to look into it or add a focused UI test for OTP Return behavior separately.
Actually currently I do not have access of mac and iPad that is why I am unable to build it and test it.
Thanks @amansingh1207. Since this wasn't observed on a device and Return never reaches the clearing path on main (verified on iPad with a hardware keyboard in both sign-in and PhoneReauthView), I'll close this as not reproducible along with #1408. Please reopen with a screen recording if you hit it on real hardware.
12. Thanks @amansingh1207. Since this wasn't observed on a device and Return never reaches the clearing path on main (verified on iPad with a hardware keyboard in both sign-in and PhoneReauthView), I'll close this as not reproducible along with #1408. Please reopen with a screen recording if you hit it on real hardware.
Hi @demolaf please check the screen recording that I has uploaded.
Thanks @amansingh1207, the recording helps. It shows the legacy UIKit phone UI (FUICodeField), where the on-screen keyboard's Return key inserts a newline into the code and removes a dash each time.
That component was removed in v16.0.0, so it isn't the SwiftUI VerificationCodeInputField that #1408 changes.
Versions below v16 are no longer maintained, so we won't be shipping a fix for them.
Please upgrade to v16 (FirebaseUI SwiftUI), where this doesn't occur, and if you can still reproduce it there, share your FirebaseUI and iPadOS versions plus a minimal sample project and we'll take another look.
Activity
demolaf commentedon Oct 19, 2026
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.
amansingh1207 commentedon Oct 20, 2026
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!
demolaf commentedon Oct 20, 2026
Hi @amansingh1207, I couldn't reproduce this on
main(iPad simulator, hardware keyboard, sign-in andPhoneReauthView): Return only reachestextFieldShouldReturnand 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.
amansingh1207 commentedon Oct 31, 2026
Hi @demolaf,
The UI test failure (testSignInDisplaysSignedInView in FirebaseSwiftUIExampleUITests) is unrelated to this PR — my change only touches VerificationCodeInputField.swift (added textFieldShouldReturn + returnKeyType = .done), which is used in phone OTP flows, not the sign-in/sign-out path in that test.
Looks like a flaky/pre-existing e2e issue (likely emulator/auth-timing related). Could we re-run the UI workflow? If it keeps failing, happy to look into it or add a focused UI test for OTP Return behavior separately.
Actually currently I do not have access of mac and iPad that is why I am unable to build it and test it.
Thanks!
demolaf commentedon Nov 2, 2026
Thanks @amansingh1207. Since this wasn't observed on a device and Return never reaches the clearing path on
main(verified on iPad with a hardware keyboard in both sign-in andPhoneReauthView), I'll close this as not reproducible along with #1408. Please reopen with a screen recording if you hit it on real hardware.amansingh1207 commentedon Nov 2, 2026
VID-20260824-WA0000.mp4
github-actions commentedon Nov 2, 2026
This item is closed, so it may not receive regular attention.
If it is still relevant, please open a new issue with an up-to-date reproduction, or open a new pull request.
amansingh1207 commentedon Nov 2, 2026
Hi @demolaf please check the screen recording that I has uploaded.
github-actions commentedon Nov 2, 2026
This item is closed, so it may not receive regular attention.
If it is still relevant, please open a new issue with an up-to-date reproduction, or open a new pull request.
demolaf commentedon Nov 2, 2026
Thanks @amansingh1207, the recording helps. It shows the legacy UIKit phone UI (
FUICodeField), where the on-screen keyboard's Return key inserts a newline into the code and removes a dash each time.That component was removed in v16.0.0, so it isn't the SwiftUI
VerificationCodeInputFieldthat #1408 changes.Versions below v16 are no longer maintained, so we won't be shipping a fix for them.
Please upgrade to v16 (FirebaseUI SwiftUI), where this doesn't occur, and if you can still reproduce it there, share your FirebaseUI and iPadOS versions plus a minimal sample project and we'll take another look.