4

Each time when I write character in TextField - displayed empty popover near the field.

enter image description here

It is displayed only on last MacOS/SwiftUI on few computers, but cannot be reproduced on older OS/SwiftUI.

Reproduced on:

macOS: 12.2 (21D49) + 12.2.1

xCode: 13.2.1 (13C100)

Looks like it does not reproduces on 12.2b

Anyone know how to fix it?

HStack {
    VStack(alignment: .trailing, spacing: 12) {
        Text("Username or email:")

        Text("Password:")
    }
    
    VStack {
        // REPRODUCED ONLY HERE
        TextField  ("Username or email",    text: $email)

        SecureField("Password", text: $password)
    }
    .frame(width: 190)
}
.padding(.bottom, 15)

Update:

  • It is can be reproduced on macOS 12.2.1

  • It opens "empty popup" with size of last opened context menu - if I click on password field it's opens passwords context menu and after this I will see:

enter image description here

UPD:

Bug does not reproduce on macOS Ventura 13.0.1 (22A400)

6
  • 1
    I can't reproduce it on macOS 12.2b and Xcode 13.2.1 Commented Feb 15, 2022 at 17:31
  • @ChrisR thanks for info Commented Feb 15, 2022 at 17:33
  • 1
    This issue still occurs to me on macOS 12.4 and Xcode 13.4.1 (13F100). Quico's answer removed the popover but I couldn't find a way to remove the "Passwords…" popover. Commented Jul 20, 2022 at 19:32
  • Any luck fixing this? Still happens to me Commented Dec 8, 2022 at 13:11
  • @conorgriffin I cannot reproduce bug on macOS 13.0.1 (22A400) Ventura Commented Dec 8, 2022 at 17:30

1 Answer 1

1

I could reproduce this issue with macOS 12.3 and Xcode 13.3. Explicitly setting the NSTextContentType of the SecureField (via .textContentType(.password)) fixed it for me.

Sign up to request clarification or add additional context in comments.

1 Comment

I noticed this doesn't always work. In my case, my form was in a custom view, which is part of a sheet, which still showed this empty popover. However this is the closest answer I found for a fix to this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.