0

The onSubmit is not called on Enter if the passwords system popover is presented

SecureField("Password", text: $password)
    .textContentType(.password)
    .textFieldStyle(FTextFieldStyle())
    .focused($focusedField, equals: .password)
    .onSubmit {
        if canLogin() {
            login()
        } else {
            focusedField = .username
        }
    }

enter image description here

Once the Passwords dialog is gone, the onSubmit works again on enter

How to get it always working

Peter Lapisu
  • 19,915
  • 16
  • 123
  • 179
  • I think that is expected behavior, the first to dismiss the box and then to actually submit. I don't see what needs to be fixed. – lorem ipsum Sep 06 '22 at 12:00
  • 1
    its not expected, since you can still type into the field, so pressing Enter clearly represents the intent – Peter Lapisu Sep 06 '22 at 12:11

0 Answers0