SecureField not calling onSubmit when Password system popover is presented

Viewed 26

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

0 Answers
Related