Anybody seen this/have any ideas? On macOS if you present an Alert, if your window is resizable and you happen to resize it while the alert is shown, it doesn't dismiss easily. Instead, the Alert continues to pop back up. It will eventually stop doing this, and how many times the alert reshows itself before giving up is directly proportional to how long you spend resizing the window.
Super short program to illustrate it (and this is using Swift lifecycle for a macOS app):
struct ContentView: View {
@State var showWarning = false
var body: some View {
VStack {
Spacer()
Text("Hello, world!").padding()
Button("Warn") {
showWarning = true
}
Spacer()
}.alert(isPresented: $showWarning) {
Alert(title: Text("tite"), message: Text("message"),
dismissButton: .default(Text("OK")))
}.frame(minWidth: 400, maxWidth: 800,
minHeight: 400, maxHeight: 800)
}
}