[Go to site: main page, start]

Tapping saved login does nothing after typing when .autocorrectionDisabled() or .textInputAutocapitalization(.never) modifier is applied

If a username field has .autocorrectionDisabled() or .textInputAutocapitalization(.never), tapping the saved login above the keyboard stops working once the user has typed part of their email. Nothing gets filled in. Seen on iPhone 16, iOS 27.0 (24A437).

I've also reported this to Apple through Feedback Assistant (FB24825410).

Steps to reproduce

You need an app with Password AutoFill set up (a webcredentials associated domain) and a saved login for that domain.

  1. Tap the email field. The saved login appears above the keyboard.
  2. Type a few letters of the email.
  3. Tap the saved login.

Expected: the email and password fields fill in, replacing what was typed. Actual: nothing happens.

What works

A username field with only .textContentType(.username) and .keyboardType(.emailAddress). Tapping the saved login fills both fields, no matter how much the user has typed.

What breaks

  • With .autocorrectionDisabled(), the tap works after 1 typed character, but does nothing after 2 or more.
  • With .textInputAutocapitalization(.never), the tap does nothing after even 1 typed character.
  • UIKit has the same problem: a UITextField with autocorrectionType = .no behaves like .autocorrectionDisabled().

In all of these cases, choosing the login from the key icon's Passwords sheet still fills both fields. Only the tap on the suggestion above the keyboard fails.

Sample

struct LoginView: View {
    @State private var email = ""
    @State private var password = ""

    var body: some View {
        VStack {
            TextField("Email", text: $email)
                .textContentType(.username)
                .keyboardType(.emailAddress)
                // Either of these breaks AutoFill once the user types:
                .autocorrectionDisabled()              // fails after 2+ typed characters
                .textInputAutocapitalization(.never)   // fails after 1 typed character

            SecureField("Password", text: $password)
                .textContentType(.password)
        }
    }
}

Workaround

I removed both modifiers from our username field and it works. Typed emails still didn't get autocorrected in my testing.

Has anyone found a way to keep these modifiers on a username field without breaking AutoFill?

Possibly related: https://developer.apple.com/forums/thread/702970

Answered by DTS Engineer in 909561022

Thanks for the detailed steps, including the Passwords sheet comparison: filling from the key icon still works when the suggestion above the keyboard doesn't. FB24825410 is the right place for this problem.

Your current configuration matches the example in Enabling Password AutoFill on a text input view. For a service that uses email addresses as usernames, that example sets only the text content type to username and the keyboard type to emailAddress. The documentation describes neither an interaction between AutoFill and the autocorrection or autocapitalization settings nor a way to keep either modifier and avoid this problem.

Without the two modifiers, the default settings apply. The textInputAutocapitalization(_:) documentation gives the default as .sentences. The UIKit autocorrectionType documentation says its default "for most input methods results in autocorrection being enabled." Neither page describes an exception for the username content type or the emailAddress keyboard. The lack of autocorrection in your testing is observed behavior, not a documented guarantee.

For the Fill Strong Password problem in your follow-up, please file a separate report and post its FB number here.

I'm also seeing a second Password AutoFill problem, on sign-up. It may or may not be related: it happens without either of the modifiers above, and on an empty field.

  1. Tap the New Password field. The "Use Strong Password?" sheet appears.
  2. Tap Fill Strong Password.

Expected: the generated password fills the field. Actual: nothing happens and the field stays empty.

Same device and iOS version. I haven't found a workaround. Minimal repro:

struct SignUpView: View {
    @State private var email = ""
    @State private var password = ""

    var body: some View {
        Form {
            Section {
                TextField("Email", text: $email)
                    .textContentType(.username)
                    .keyboardType(.emailAddress)

                SecureField("New Password", text: $password)
                    .textContentType(.newPassword)
            }
        }
    }
}

Thanks for the detailed steps, including the Passwords sheet comparison: filling from the key icon still works when the suggestion above the keyboard doesn't. FB24825410 is the right place for this problem.

Your current configuration matches the example in Enabling Password AutoFill on a text input view. For a service that uses email addresses as usernames, that example sets only the text content type to username and the keyboard type to emailAddress. The documentation describes neither an interaction between AutoFill and the autocorrection or autocapitalization settings nor a way to keep either modifier and avoid this problem.

Without the two modifiers, the default settings apply. The textInputAutocapitalization(_:) documentation gives the default as .sentences. The UIKit autocorrectionType documentation says its default "for most input methods results in autocorrection being enabled." Neither page describes an exception for the username content type or the emailAddress keyboard. The lack of autocorrection in your testing is observed behavior, not a documented guarantee.

For the Fill Strong Password problem in your follow-up, please file a separate report and post its FB number here.

Tapping saved login does nothing after typing when .autocorrectionDisabled() or .textInputAutocapitalization(.never) modifier is applied
 
 
Q